Define HTML tags and explain its types.
- Container tag or Paired tag
- Empty tag or Single tag
The HTML tag which has both opening and closing tag is called container tag or paired tag. The closing tag is written with backslash (/).
Example: <html>….</html>, <body>…</body>, etc.
The HTML tag which doesn’t have its closing tag is called empty tag or single tag. It doesn’t need any tag as its closing tag.
Example: <br>, <img>, <hr>, etc.
The additional function or instruction provided by HTML tag is called attribute. It performs some related tasks of HTML tag. It is written inside HTML tag. It is not closed separately.
Example: bgcolor, src, align, size, etc.
Example of HTML tags using attribute:
- <h1 align=”center”>MeroPaper</h1>
- <body bgcolor=”red”>…</body>
- <img src=”photo.png”>
This question is not important in the final examination of Grade 11 in Computer Science, but it might be asked in examination.