HTML Building Blocks

  • This is a markup language that commands the browser on how to display the content with the help of two things:- tags and attributes
  • Tags are like keywords which helps the browser to distinguish between HTML tag and simple content. It usually gets enclosed in angle brackets.
  • Attributes defines the behaviour of these tags, always come in name and value pair.

Consider the most common tag and attribute example:-

<p align="left">Hello Designer!</p>

Here, <p> is the HTML tag and align is attribute. Align is the additional behaviour which helps in aligning the paragraph to the left side.

Golden Rules to Remember:-

Rule 1:

When we are using multiple tags, the tags must be closed in the same order in which they are opened. For eg:-

<p align="left"><a>Hello Designer!</a></p>

Rule 2:

The majority of tags must be opened and closed with the element information like title or content resting between the tags.