HTML Tags
2 min read

HTML Tags

Tags act like containers. Content lies between their opening and closing tags
HTML Tags

Tags act like containers. They tell you something about the information that lies between their opening and closing tags.

<html>
  <body>
    <h1>This is the Main Heading</h1>
    <p>This text might be an introduction</p>
    <h2>This is a Sub-Heading</h2>
    <p>Many long articles have sub-headings.</p>
    <h2>Another Sub-Heading</h2>
    <p>Here you can see another sub-heading.</p>
  </body>
</html>
  1. The opening <html> tag indicates that anything between it and a closing </html> tag is HTML code.
  2. The <body> tag indicates that anything between it and the closing </body> tag should be shown inside the main browser window.
  3. Words between <h1> and </h1> are a main heading.
  4. A paragraph of text appears between <p>  and </p>these and tags.
  5. Words between <h2> and </h2> form a sub-heading.

Body closing tag is an end of main content to be shown in browser, while closing tag of html is end of html file and beyond this no any written words are supposed to be parsed by browser engine.

Tag:

Now what exactly the tag is . Tag is an element of html. tag has further entities. Tag is a set of right angle, left angle bracket and a slash character / .

A deep look at opening tag.

opening html tag
opening html tag

A deep look at ending tag.

a closing html tag
closing html tag

Enjoying these posts? Subscribe for more