0
How doo you style the text you can choose to be written on your website in javascript with css?
13 Réponses
+ 2
There are plenty of ways.Example: you can create class on CSS page like .text-style and give that on HTML page class or you can just do everything on HTML page and example for h2 do:
h2{
font-family: Monospace;
}
I hope i helped you.
+ 3
so if you make something in js as text you give it an element type using append and stuff like that and in css put the element{
style:;
}
+ 1
<p id="text">
The text
</p>
+ 1
i mean this text: var mystring1 = "I am learning ";
document.write(mystring1);
+ 1
Frans
var text= "<h3> Text </h3>"
document.write(text)
0
Frans
Please use CSS
0
? Yahiko
0
#text {
color:red;
}
0
so i can use that in the <script> section?
0
No sir, rather use <style>
===================
<style>
.text{
color:red;
}
</style>
0
but can i give some text an id when its written in javascript?
0
You can give it an ID
0
can you show me?