Loading

Quipoin Menu

Learn • Practice • Grow

html / Tag
interview

Q1. What is an HTML tag and how is it written?
An HTML tag is a markup element written between angle brackets like <tagname>. Most tags have an opening tag and a closing tag with content in between.

Q2. What is the difference between container tags and empty tags?
Container tags have both opening and closing tags (<p></p>) and can contain content. Empty tags (like <br>, <img>) have no content and no closing tag.

Q3. What are void elements in HTML?
Void elements are HTML elements that cannot have any content and do not need a closing tag, such as <br>, <hr>, <img>, <input>.

Q4. Can HTML tags be nested? Give an example.
Yes, HTML tags can be nested. Example: <div><p>This is a paragraph inside a div</p></div> - the p tag is nested inside the div tag.

Q5. What happens if you forget to close an HTML tag?
Browsers may try to render the page anyway, but it can lead to unexpected layout issues and invalid HTML. Always properly close your tags.