HTML elements

0
20

HTML elements are always enclosed in opening and closing tags.

Example:

For heading:

  1. <h1> Heading</h1>

It is imperative to use the closing tag.However ,there are some HTML elements that don’t need a closing tag such as <img…/>, <hr /> and <br />.These are known as void elements.

 

Nested HTML elements

 

  1. <!DOCTYPE html>
  2.  
  3. <h1> Heading</h1>
  4. <p>paragraph<i>italic</i></p>
  5.  
  6. </body>
  7. </html>
Facebook Comments
(Visited 26 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here