Incorrect HTML 'body' Elements

Q

What Is Wrong with My HTML "body" Elements?

✍: 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>

 

HTML Body Tag and Block Level Tags

⇒⇒HTML Tutorials

2017-02-20, 181👍, 0💬