- What is the difference between
<div> and <span> in HTML? When would you use one over the other?
- What are semantic HTML elements? Name at least 5 and explain why semantic HTML matters.
- How does an HTML form work? Explain the
action, method attributes and the difference between GET and POST methods in a form submission.
- What is the purpose of the
<meta> tag in HTML? Name at least 3 meta tags you commonly use and explain what they do.
- What is the difference between
localStorage, sessionStorage, and cookies? When would you use each one?
- What is the
alt attribute in an <img> tag? Why is it important? Also, what is the aria-label attribute and when would you use it?
- What is the difference between loading a script with
async and defer attributes in a <script> tag? Why does it matter where you place your <script> tags in an HTML document?
- What is the difference between
id and class attributes in HTML? Can an element have both? How are they used differently in CSS and JavaScript?
- When should you use an HTML
<table> and when should you NOT use it? Why was using tables for page layout considered bad practice, and what replaced it?
- What are some important new features introduced in HTML5? How is HTML5 different from HTML4? Name at least 4 new elements or APIs introduced in HTML5.