What Is Wrong with My Body Elements

Q

What Is Wrong with My Body Elements? - XHTML 1.0 Tutorials - Body Tag and Block Level Tags

✍: FYIcenter.com

A

If you are having trouble with your body elements, it could be caused by one of the following common mistakes:

 <!-- Text can not be used in body directly -->
 <body>
  Hello world!
 </body>

 <!-- "title" is not allowed in body element -->
 <body>
  <title>XHTML FAQ</title>
 </body>
 
 <!-- "img" is not a block level eleent -->
 <body>
  <img src="/images/fyi.gif"" alt="FYI" />
 </body>

 <!-- "p" element is missing closing tag -->
 <body>
  <p>Welcome to FYIcenter.com!
 </body>

 <!-- body element can not be empty -->
 <body>
 </body>

2007-05-12, 4559👍, 0💬