← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 272 · 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.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  2. 2.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) contact.html (c) Take the quiz (d) Play games
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
  4. 4.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.</u>
    <h2>Rain today
    <i>Fun facts</i>
    (a) </u> (b) </i> (c) </p> (d) </h2>
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>The red kite</p>
  6. 6.Which of these is an empty tag? (a) <title> (b) <b> (c) <p> (d) <hr>
  7. 7.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  8. 8.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) about.html (b) https://example.com (c) School news (d) contact.html
  9. 9.Which of these goes in the head? (a) <h1> (b) <img> (c) <a> (d) <meta charset="utf-8">
  10. 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  11. 11.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  12. 12.🔍 One closing tag is missing. Which one?
    <i>The red kite</i>
    <p>Cricket is fun.</p>
    <b>Hello, world!
    (a) </b> (b) </i> (c) </h3> (d) </p>
  13. 13.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
  15. 15.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  16. 16.True or false: <ul> is one item of a list. (a) True (b) False
  17. 17.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) about.html
  18. 18.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  19. 19.🔍 One closing tag is missing. Which one?
    <b>Fun facts</b>
    <h1>Hello, world!
    <h2>My pets</h2>
    (a) </h1> (b) </h2> (c) </b> (d) </h3>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  21. 21.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
  22. 22.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Rain today</h4>
    <p>Hello, world!</p>
    <h3>Our school trip</h3>
  23. 23.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  24. 24.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
  25. 25.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  26. 26.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) shows line numbers (d) colours code to help us
  27. 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
  29. 29.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Hello, world!</h2>
    <h4>The red kite</h4>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  30. 30.🔍 One closing tag is missing. Which one?
    <em>The red kite</em>
    <small>I love mangoes.</small>
    <h3>Rain today
    (a) </h3> (b) </h2> (c) </em> (d) </small>
  31. 31.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  32. 32.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My pets</h2>
    <h3>Good morning!</h3>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  33. 33.True or false: in <img>, height tells which image to load. (a) False (b) True
  34. 34.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in the same tab (b) in a new tab
  35. 35.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  36. 36.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.True or false: <title> goes in the head. (a) False (b) True
  38. 38.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) Contact us (c) href (d) games.html
  39. 39.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
  40. 40.🔍 One closing tag is missing. Which one?
    <i>My pets
    <strong>My best friend</strong>
    <b>Rain today</b>
    (a) </small> (b) </b> (c) </i> (d) </strong>

Answer key

  1. href
  2. Take the quiz
  3. <h2>
  4. </h2>
  5. 3
  6. <hr>
  7. the body
  8. about.html
  9. <meta charset="utf-8">
  10. <li>
  11. opens it in a new tab
  12. </b>
  13. 1
  14. 1
  15. on the browser tab
  16. False
  17. Take the quiz
  18. <ol>
  19. </h1>
  20. Birthday cake
  21. has an address bar
  22. 3
  23. True
  24. </p>
  25. in the same tab
  26. answers page requests
  27. Yes
  28. 2
  29. 3
  30. </h3>
  31. <!--
  32. 3
  33. False
  34. in the same tab
  35. in a new tab
  36. an opening tag
  37. True
  38. Contact us
  39. <ol>
  40. </i>

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