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 act as keywords, helping the browser differentiate between HTML tags and simple content. They are usually enclosed in angle brackets.
- Attributes define the behavior of these tags and always come in a name and value pair.
Here is an example of tag and attribute
In the above example, <p> is the HTML tag, and "align" is the attribute. "Align" is an additional behavior that aligns the paragraph to the left side.
Golden Rules to remember
Rule #1:
When using multiple tags, they must be closed in the same order in which they are opened.
Check the example below.
Rule #2:
The majority of tags must be opened and closed with the element information like title or content resting between the tags.