HTML Styles
25 March 2025 | Category: HTML
HTML Styles: A Quick Guide
HTML styles let you add flair to elements using the style
attribute with CSS properties. You can change colors, fonts, sizes, and more directly in your tags. Let’s see it in action.
Basic Styling Example
Here’s a page with styled elements:
Styles Demo Red Heading Big text, made on March 24, 2025.
Multiple Styles
Combine properties in one style
attribute:
Blue Arial text
Background and Alignment
Try background colors or text alignment:
Centered Yellow
Try It
Save the first example as styles.html
(UTF-8 encoding) and open it in a browser. You’ll see a red heading and larger text. Add the other examples—mix colors or fonts—then save and refresh to see the changes.
Why Styles?
They make your page pop without separate CSS files. Play with properties like font-weight: bold
or text-align: right
to customize further!