HTML
HTML StylesHTML Styles
The HTML style attribute is used to add styles to an element.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
Setting the style of an HTML element, can be done with the style attribute. You can change colors, fonts, size, and more.
Syntax
Syntax
Try it Yourself
Hands-on Practice
Modify the code below to see how it affects the output. This is the best way to learn!
Interactive Editor
1234567891011121314151617181920
Live Preview