HTML interview questions

  1. Can you explain the difference between HTML and XHTML?
  2. What is the purpose of the doctype declaration in an HTML document?
  3. How do you create hyperlinks in HTML?
  4. What is the difference between a div and a span element?
  5. Can you explain the different types of headings in HTML and how they should be used?
  6. How do you create lists (ordered, unordered) in HTML?
  7. How do you create tables in HTML and what are some of the key elements that make up a table?
  8. How do you use images in HTML and what are some of the attributes used to control their size and placement?
  9. What is the purpose of the alt attribute in an img tag?
  10. How do you create forms in HTML and what are some of the input types that are available?
  11. How do you use CSS and JavaScript to enhance the functionality and design of your HTML pages?
  12. How do you use meta tags in HTML and what information do they provide to search engines and browsers?
  13. How do you use the semantic elements like section, article, header and footer in HTML5?
  14. Can you explain the role of HTML5 in the development of mobile web applications?
  15. How do you make an HTML document accessible to people with disabilities?\