Web Development

HTML – Nesting Structure

Nesting tags in HTML is widely used while playing with HTML code. This is the most important thing while doing HTML coding.

HTML tags should be arranged properly and closed properly. If the HTML tags are not arranged or closed properly, then there may occur problems.

What is the Nesting of HTML Tag? Simply the nesting of the tag using HTML tag, inside tag is known as the nesting of tags.

Similarly: As we know in programming loop inside loop is known as nesting of loop.


<p><center><b>Cricket and</b><i>football are awesome games</i></center></p>

Cricket and football are awesome games

See the above example of the nesting of the html tags.

  1. <p> tag started.
  2. <center> tag started.
  3. <b> tag started and immediately it is closed </b> because it’s work is finish.
  4. <i> tag started and it is also closed before </center> tag because the <i> tag is started after <center> tag.
  5. </center> tag closed because it is started after <p> tag.
  6. Now finally </p> tag closed.

Note: You must have to close your tags sequentially one after another.  .

  1. <html> is the document so it started first and closed last </html>
  2. <head> is the decoration section, it contains title, meta tag for website so it started after <html> tag and close before<body> tag. or closed after defining the decorations sections, titles and meta tag.
  3. <title> comes inside the <head> tag and it starts and immediately it closed </title>.
  4. <body> it contains content of the websites so it comes after <html> and <head> tags and ends before </html> tag.


About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

HTML introduction
Web Development

HTML – Introduction, History & Syntax

  • December 21, 2019
So, first of all, I would like to ask a question for the first time when you heard this term
html heading tag
Web Development

HTML – Heading Tag With Syntax

  • December 21, 2019
A heading tag is one of the most important tags we focus on in HTML or web development because, without