HTML Interview Questions
Q.
What is HTML?
▾
Q.
What is an HTML tag?
▾
Q.
What is an HTML element?
▾
Q.
What is the basic structure of an HTML document?
▾
Q.
What is the purpose of the <head> tag?
▾
Q.
What is the purpose of the <body> tag?
▾
Q.
What are headings in HTML?
▾
Q.
What is the difference between <p> and <div>?
▾
Q.
What is the difference between <div> and <span>?
▾
Q.
What are HTML attributes?
▾
Q.
What are semantic HTML elements?
▾
Q.
What is the difference between semantic and non-semantic elements?
▾
Q.
What is the difference between id and class?
▾
Q.
What is the difference between block-level and inline elements?
▾
Q.
What is the difference between <strong> and <b>?
▾
Q.
What is the difference between <em> and <i>?
▾
Q.
What is the purpose of the alt attribute?
▾
Q.
What is the difference between absolute and relative URLs?
▾
Q.
What is the purpose of the <a> tag?
▾
Q.
What is the purpose of the <form> element?
▾
Q.
What is the difference between GET and POST in HTML forms?
▾
Q.
What are HTML lists?
▾
Q.
What are HTML tables?
▾
Q.
What is the difference between <section> and <article>?
▾
Q.
What is HTML5?
▾
Q.
What is the purpose of the DOCTYPE declaration?
▾
Q.
What is the difference between <script>, async, and defer?
▾
Q.
What is the viewport meta tag?
▾
Q.
What is the difference between cookies, localStorage, and sessionStorage?
▾
Q.
What is the purpose of ARIA in HTML?
▾
Q.
What is the difference between <button> and <a>?
▾
Q.
What is the purpose of the loading="lazy" attribute?
▾
Q.
What is the difference between <iframe> and <embed>?
▾
Q.
What is the purpose of data-* attributes?
▾
Q.
How would you structure HTML for a good SEO-friendly webpage?
▾
Q.
Why is semantic HTML important for SEO?
▾
Q.
How would you improve the accessibility of an HTML form?
▾
Q.
What happens if multiple elements have the same ID?
▾
Q.
How can you improve HTML performance?
▾
Q.
What are some common HTML mistakes developers make?
▾
Q.
What are HTML comments?
▾
Q.
What are void elements in HTML?
▾
Q.
What is nesting in HTML?
▾
Q.
What are HTML entities?
▾
Q.
What is the difference between <br> and <hr>?
▾
Q.
What are <pre> and <code> elements?
▾
Q.
What are <sup> and <sub>?
▾
Q.
What are <mark>, <small>, <del>, and <ins>?
▾
Q.
What is the difference between an absolute path and a relative path?
▾
Q.
What is a favicon?
▾
Q.
What is the purpose of the <select> element?
▾
Q.
What is the difference between checkbox and radio button?
▾
Q.
What are HTML form validation attributes?
▾
Q.
What is the difference between disabled and readonly?
▾
Q.
What is the difference between placeholder and value?
▾
Q.
What is the purpose of the name attribute in forms?
▾
Q.
What is the autocomplete attribute?
▾
Q.
What are <fieldset> and <legend>?
▾
Q.
What is the <picture> element?
▾
Q.
What is the <source> element?
▾
Q.
What are <audio> and <video> elements?
▾
Q.
What is the <track> element?
▾
Q.
What is srcset?
▾
Q.
What are <figure> and <figcaption>?
▾
Q.
What is the DOM?
▾
Q.
What is the difference between HTML and DOM?
▾
Q.
How does a browser parse HTML?
▾
Q.
What is the Critical Rendering Path?
▾
Q.
What is the difference between async and defer?
▾
Q.
What is the purpose of preload?
▾
Q.
What is the purpose of prefetch?
▾
Q.
What is the <noscript> element?
▾
Q.
What is Content Security Policy?
▾
Q.
What is the sandbox attribute of an iframe?
▾
Q.
What is same-origin policy?
▾
Q.
What is HTML validation?
▾
Q.
What is a canonical URL?
▾
Q.
What is the robots meta tag?
▾
Q.
What is structured data?
▾
Q.
What are Open Graph meta tags?
▾
Q.
How does heading hierarchy affect SEO?
▾
Q.
How should images be optimized for SEO?
▾
Q.
What is aria-label?
▾
Q.
What is aria-labelledby?
▾
Q.
What is aria-describedby?
▾
Q.
What are landmark elements?
▾
Q.
How do you make an HTML page keyboard accessible?
▾
Q.
Why are labels important in forms?
▾
Q.
What is the difference between native HTML and ARIA?
▾
Q.
How would you create an SEO-friendly blog page?
▾
Q.
How would you structure an e-commerce product page?
▾
Q.
How would you create an accessible login form?
▾
Q.
How would you make a navigation menu accessible?
▾
Q.
How would you optimize a webpage containing many images?
▾
Q.
How would you make an HTML video accessible?
▾
Q.
How would you safely embed a third-party webpage?
▾
Q.
Why should you not use <div> for every element?
▾
Q.
How would you improve the HTML structure of an existing poorly structured website?
▾
Q.
What would you check if a webpage has poor SEO despite having good content?
▾
Q.
What would you check if a webpage is not accessible?
▾