← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 819 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  2. 2.True or false: <ul> shows bullet points. (a) True (b) False
  3. 3.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  4. 4.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) My Hobbies (c) index.html (d) Thanks for visiting.
  6. 6.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  7. 7.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  8. 8.True or false: a web browser shows pages from the web. (a) True (b) False
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.Which of these is an opening tag? (a) <title> (b) </title> (c) </body> (d) </h1>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
  14. 14.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
  16. 16.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  17. 17.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  18. 18.True or false: a code editor opens web pages for us. (a) True (b) False
  19. 19.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
  21. 21.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  22. 22.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  23. 23.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <b>Rain today</b>
    <h3>Good morning!
    (a) </i> (b) </h3> (c) </b> (d) </h2>
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  26. 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
  27. 27.True or false: <title> has a closing tag. (a) True (b) False
  28. 28.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>I love mangoes.</p>
    <h4>Hello, world!</h4>
    <p>Fun facts</p>
  29. 29.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  30. 30.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) games.html (c) Contact us (d) href
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>My best friend</p>
    (a) The red kite (b) Good morning! (c) My best friend
  32. 32.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  33. 33.True or false: <h1> is an empty tag. (a) False (b) True
  34. 34.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  35. 35.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  36. 36.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  37. 37.🔍 One closing tag is missing. Which one?
    <u>Our school trip</u>
    <h2>I love mangoes.
    <i>Hello, world!</i>
    (a) </h3> (b) </u> (c) </i> (d) </h2>
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  39. 39.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="300">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  40. 40.True or false: HTML on its own can count button clicks. (a) False (b) True

Answer key

  1. 150
  2. True
  3. <a href="about.html">
  4. 6
  5. My Hobbies
  6. to leave notes
  7. <a>
  8. True
  9. <h1>
  10. <h1>
  11. numbers
  12. <title>
  13. 1
  14. a code editor
  15. <h6>
  16. 2
  17. <h1>
  18. False
  19. opens it in a new tab
  20. 2
  21. href
  22. No
  23. an empty tag
  24. </h3>
  25. 400
  26. Yes
  27. True
  28. 2
  29. <h6>
  30. Contact us
  31. The red kite
  32. in a new tab
  33. False
  34. Yes
  35. <ol>
  36. <ol>
  37. </h2>
  38. <h5>
  39. moon.png
  40. False

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids