← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 817 · 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.💬 Does the browser show comments on the page? (a) No (b) Yes
  2. 2.🔠 Are headings shown in bold by default? (a) Yes (b) No
  3. 3.True or false: <ol> lists things in any order. (a) True (b) False
  4. 4.True or false: HTML on its own can keep a high score. (a) False (b) True
  5. 5.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  6. 6.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  7. 7.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
  8. 8.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) Play games (b) contact.html (c) https://example.com (d) maths.html
  9. 9.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  12. 12.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  13. 13.True or false: <li> is an ordered list. (a) False (b) True
  14. 14.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  15. 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  17. 17.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  18. 18.🔗 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
  19. 19.True or false: in <img>, width sets how wide it is. (a) True (b) False
  20. 20.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  21. 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  22. 22.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My pets</p>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  25. 25.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
  26. 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  27. 27.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) map.png (b) cake.jpg (c) A red kite (d) kite.png
  28. 28.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a calculator (d) a web browser
  29. 29.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.True or false: <title> is an empty tag. (a) False (b) True
  31. 31.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  32. 32.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small> (d) <small/>
  33. 33.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) answers page requests (d) shows pages from the web
  34. 34.🔍 One closing tag is missing. Which one?
    <b>My pets
    <i>Hello, world!</i>
    <h1>Our school trip</h1>
    (a) </h1> (b) </small> (c) </i> (d) </b>
  35. 35.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) About us (b) https://example.com (c) contact.html (d) about.html
  36. 36.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) games.html (c) about.html (d) quiz.html
  37. 37.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  38. 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  39. 39.Which of these is a closing tag? (a) <b> (b) <li> (c) </title> (d) <h1>
  40. 40.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. No
  2. Yes
  3. False
  4. False
  5. in a new tab
  6. in a new tab
  7. 2
  8. contact.html
  9. <h6>
  10. 2
  11. alt
  12. height
  13. False
  14. to describe the image
  15. an opening tag
  16. an attribute
  17. on the browser tab
  18. opens it in a new tab
  19. True
  20. <img>
  21. a web browser
  22. <!--
  23. 3
  24. 150
  25. </em>
  26. <a href="about.html">
  27. kite.png
  28. a web browser
  29. in the body
  30. False
  31. True
  32. </small>
  33. shows pages from the web
  34. </b>
  35. about.html
  36. quiz.html
  37. <h6>
  38. Yes
  39. </title>
  40. an empty tag

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