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

The Style Tag

The <style> tag can be used to put CSS directly into your HTML page. Let's see an example.

If I have this HTML:
<div id="banana">Banana</div>
I can insert a <style> tag:
<style>
  #banana {
    background-color: yellow;
  }
</style>
<div id="banana">Banana</div>
The #banana text above is called a selector. It tells the CSS to style an element that has an ID of banana.


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