What are style attributes? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

What are style attributes?

3rd Sep 2020, 8:13 PM
Manish Agarwal
4 Respuestas
+ 5
<h1> hello </h1> You can style it in css by grabbing this h1, h1 { color: green; padding: 10px; } Theres another way (using style attribute / inline styles) <h1 style="color:green; padding: 10px;"> hello </h1>
3rd Sep 2020, 11:56 PM
maf
maf - avatar
3rd Sep 2020, 8:16 PM
Abhay
Abhay - avatar
+ 1
You can use css within your html file the using style tag to create inline css for html page.
3rd Sep 2020, 8:48 PM
HBhZ_C
HBhZ_C - avatar
+ 1
It is used for inline styling of an element. But I think it decreases code readability . So practise for internal using style tag or external css using style.css page.
4th Sep 2020, 1:45 AM
Divya Mohan
Divya Mohan - avatar