All the examples we have discussed in our previous article had one tag. Now, let’s assume, you have a requirement to show some texts of a sentence in bold and others as simple text. This can be achieved using nested html elements. This can be easily understood by given example:
In this code, we have used two tags <p> and <b>.
Note: HTML tags are not case sensitive. Thus, <b> and <B> will behave in the same way.
Nested HTML Elements
The HTML Tags in nested form constitute the web pages that we see on our browsers and hence it is very important to keep in mind the opening and closing of the tags. The closing tag defines the end of the effect of that particular tag. In the image shown below we have used connecting lines to show the usage of Nested HTML tags: