Using <style> tags in the <body> with other HTML

Posted by Gagan on Stack Overflow See other posts from Stack Overflow or by Gagan
Published on 2010-05-13T21:03:08Z Indexed on 2010/05/14 13:34 UTC
Read the original article Hit count: 238

Filed under:
|
<html>
  <body>
    <style type="text/css">
      p.first {color:blue}
      p.second {color:green}
    </style>

    <p class="first">Hello World</p>
    <p class="second">Hello World</p>

    <style type="text/css">
      p.first {color:green}
      p.second {color:blue}
    </style>

    <p class="first">Hello World</p>
    <p class="second">Hello World</p>
  </body>
</html>

How is a browser supposed to render css which is non contiguous? Is it supposed to generate some data structure using all the css styles on a page and use that for rendering?

Or does it render using style information in the order it sees?

© Stack Overflow or respective owner

Related posts about css

Related posts about html