Basic Questions
Q1: What is <!DOCTYPE html>?
It defines that the page is written in HTML5. Helps browser render content correctly.
Q2: What is the purpose of <meta> tag in HTML?
Provides metadata like charset, SEO info, viewport settings. Placed inside .
Q3: What is the use of <div> in HTML?
It`s a generic container for grouping elements, often used for styling and scripting.
Q4: What does the alt attribute in <img> do?
Provides alternate text for images for accessibility and SEO.
Q5: How to open a link in a new tab?
Use target='_blank' inside the a tag.
Q6: What is the purpose of the <form> tag?
It collects user input and sends it to the server via submit.
Q7: How to create a dropdown menu in HTML?
Use select with multiple option tags.
Q8: What does <input type='submit'> do?
Creates a button that submits the form when clicked.
Q9: Difference between <ul> and <ol>?
ul tag shows bullets (unordered), ol tag shows numbers (ordered).
Q10: What is the <label> tag used for?
Connects text to form elements, improving usability and accessibility.
Q11: What is <textarea> in HTML?
A multi-line text box for user input like comments.
Q12: What is the <button> tag used for?
Creates a clickable button for submitting or running JS.
Q13: What is a placeholder in forms?
Shows hint text inside input fields until user types.
Q14: What does <br> tag do?
Inserts a line break in text.
Mid Level Questions
Q1: What is semantic HTML?
Uses meaningful tags like article, section to improve structure, SEO, and accessibility.
Q2: Difference between <section> and <article>?
section tag groups content by topic; article tag is for standalone content like blog posts.
Q3: What is the <iframe> element?
Embeds another webpage or media into the current page.
Q4: Difference between <b> and <strong>?
b tag is visual only. strong tag has semantic meaning and improves SEO.
Q5: What is the <nav> element?
It contains website navigation links.
Q6: What is the <audio> tag?
Embeds audio files like music or podcasts into the webpage.