0

How i can write css using HTML?

8th Jul 2020, 11:14 AM
Václav Hajšman
Václav Hajšman - avatar
7 Respostas
+ 4
You can use the css in the HTML document using two ways Inline CSS <p style="color:magenta">Welcome to Sololearn :)</p> Internal CSS <p>Welcome to Sololearn </p> Inside the style tags <style> p{ color : magenta; } </style>
8th Jul 2020, 11:22 AM
Nilesh
Nilesh - avatar
+ 4
venda hajsman that's text color only
8th Jul 2020, 11:40 AM
Nilesh
Nilesh - avatar
+ 1
Thank you Nilesh! Your code already helped me. I was think it's like <script css> [css code] </script>
8th Jul 2020, 11:45 AM
Václav Hajšman
Václav Hajšman - avatar
+ 1
There are two options . 1.Inline CSS:- defined in inside Single HTML Element . Ex: <p style="text-align:center">Welcome to Sololearn :)</p> 2: Internal CSS :- i.e defined in the <head> section of an HTML page, within a <style> element. Ex: <!DOCTYPE html> <html> <head> <title>Solo</title> <style> p{ color : magenta; } </style> </head> <body> <p>Welcome to Sololearn </p> </body> </html> But honestly, I recommend you to use External CSS .For more https://www.w3schools.com/html/html_css.asp
29th Jul 2020, 6:52 AM
Amrit Timalsina
Amrit Timalsina - avatar
0
I want to set TEXT COLOR not BG COLOR
8th Jul 2020, 11:32 AM
Václav Hajšman
Václav Hajšman - avatar