


Khusboo Tayal
1. What is HTML?
HTML stands for HyperText Markup Language and is used to structure content on the web.
2. What is the difference between HTML and HTML5?
HTML5 is the latest version with support for new semantic tags, multimedia (audio/video), form input types, APIs (like geolocation, local storage), and more robust error handling.
3. What are HTML tags and elements?
4. What is the purpose of the <!DOCTYPE html> declaration?
It defines the HTML version and ensures the browser renders the page in standards mode.
5. What are semantic HTML elements?
These elements clearly describe their meaning (e.g., <header>, <footer>, <article>, <section>), improving accessibility and SEO.
6. What is the difference between <div> and <span>?
7. What are self-closing tags?
Tags that do not require a closing tag. Example: <img>, <br>, <hr>, <input>.
8. What is the use of the alt attribute in images?
It provides alternative text for images if they can’t be displayed and improves accessibility.
9. What is the difference between id and class in HTML?
10. What are the new form input types in HTML5?
Examples include:
email, url, tel, number, range, date, color.
11. How do you embed an image or video in HTML?
<video controls> <source src="video.mp4" type="video/mp4"> </video>
12. What is the difference between block-level and inline elements?
13. What are HTML entities?
Special characters reserved in HTML. Example:
< for <, > for >, & for &.
14. What is the <meta> tag used for?
It provides metadata about the HTML document (character encoding, viewport settings, SEO info).
15. How do you create hyperlinks in HTML?
<a href="https://example.com">Visit Example</a>
16. What is the purpose of the <label> tag in forms?
It binds a text label to a form control (like input), improving accessibility.
17. How can you create a table in HTML?
Use <table>, <tr>, <th>, and <td> elements.
<table>
<tr>
<th>Name</th><th>Age</th>
</tr>
<tr>
<td>John</td><td>30</td>
</tr>
</table>18. What is the use of the <iframe> tag?
It embeds another HTML document or webpage within the current page.
19. What are void elements in HTML?
Elements that do not have closing tags. Examples: <img>, <br>, <input>, <meta>, <hr>.
20. What is the difference between relative, absolute, and fixed paths in URLs?