Learn with Yasir

Share Your Feedback

Review Questions: HTML Basics for Beginners

  1. What does HTML stand for?
    Answer: HyperText Markup Language

  2. Which tag is used to create a hyperlink in HTML?
    Answer: <a>

  3. What is the purpose of the <title> tag in an HTML document?
    Answer: It specifies the title of the web page, which appears in the browser’s title bar or tab.

  4. Which tag is used to create a paragraph in HTML?
    Answer: <p>

  5. What is the correct syntax for adding an image in HTML?
    Answer: <img src="image.jpg" alt="description">

  6. How do you create an ordered list in HTML?
    Answer: Use the <ol> tag with <li> tags for each list item.

  7. Which tag is used to create a table row in HTML?
    Answer: <tr>

  8. What is the purpose of the <meta> tag in HTML?
    Answer: It provides metadata about the HTML document, such as character encoding and viewport settings.

  9. How do you create a line break in HTML?
    Answer: Use the <br> tag.

  10. Which attribute is used to specify the URL of a link in the <a> tag?
    Answer: href

  11. What is the difference between <ul> and <ol> tags?
    Answer: <ul> creates an unordered list (bullets), while <ol> creates an ordered list (numbers).

  12. Which tag is used to define a heading in HTML?
    Answer: <h1> to <h6>

  13. How do you specify the language of an HTML document?
    Answer: Use the lang attribute in the <html> tag. Example: <html lang="en">

  14. What is the purpose of the alt attribute in the <img> tag?
    Answer: It provides alternative text for the image if it cannot be displayed.

  15. What is the purpose of the <head> section in an HTML document?
    Answer: It contains metadata, links to stylesheets, and scripts.

  16. Which tag is used to create a horizontal line in HTML?
    Answer: <hr>

  17. How do you create a comment in HTML?
    Answer: <!-- This is a comment -->

  18. What is the purpose of the viewport meta tag?
    Answer: It ensures the web page is responsive and adapts to different screen sizes.

    How do you create ordered and unordered lists in HTML? Explain with examples.