Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

Styles in the HTML (Inline CSS)

There are two ways to have CSS in your HTML code; one is through the style attribute, and the other is through the style tag.
The Style Attribute
We've seen this in the Introduction to CSS. Let's show another example.

If I have this HTML:
<input type="text"/>
and I want to set the font size in the input box, I can do this:
<input type="text" style="font-size: 2em"/>
The result is:
Was this helpful?

Tags

Comments

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License