html - Errors on my page when I try to use CSS -


line 8, column 23: document type not allow element "style" here if try take line out format isnt correct, if leave in http://validator.w3.org/check gives me error. can explain or maybe give me correct way of doing this.

<!doctype html public "-//w3c//dtd html 4.01 transitional//en"          "http://www.w3.org/tr/html4/loose.dtd">  <html> <head> <title>randy's first html web page !</title> </head> <style type="text/css"> body h1  { background-color:#6495aa; margin-right:1350px; }  h2 { background-color:#b0c4de; margin-right:1350px; }  p { background-color:#649fff; margin-right:1350px; } div { background-color:#efffff; }  </style>   <h1> hello professor</h1> <h2> by: randy white</h2> <p> haven't done before.</p>  <p>seems ok</p>  <table border="1"> <tr> <th>month</th> <th>day</th> <th>year</th> </tr> <tr> <td>december</td> <td>1</td> <td>2010</td> </tr> </table> <a href="http://www.google.com">visit google!</a> </body> </html> 

the style tag should in head tag.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -