← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 912 · 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 words do you click on?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) Play games (c) About us (d) href
  2. 2.True or false: HTML on its own can pick a random number. (a) True (b) False
  3. 3.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in a new tab (b) in the same tab
  4. 4.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  6. 6.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  8. 8.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  9. 9.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) quiz.html (d) about.html
  10. 10.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  12. 12.True or false: in <img>, width sets how wide it is. (a) True (b) False
  13. 13.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  15. 15.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Thanks for visiting. (d) Match report
  17. 17.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
  19. 19.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <u>Hello, world!</u>
    line 2: <p>My best friend</p>
    line 3: <h3>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  21. 21.🔍 One closing tag is missing. Which one?
    <i>Good morning!</i>
    <h3>My best friend</h3>
    <p>The red kite
    (a) </h1> (b) </h3> (c) </p> (d) </i>
  22. 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) map.png (b) kite.png (c) A red kite (d) cake.jpg
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) dog.jpg (b) A happy dog (c) width (d) The full moon
  25. 25.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <p>Good morning!</p>
    <p>My pets</p>
  26. 26.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  27. 27.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  28. 28.🔠 Are headings shown in bold by default? (a) Yes (b) No
  29. 29.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  31. 31.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) contact.html (b) games.html (c) Play games (d) about.html
  32. 32.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  33. 33.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
  34. 34.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  35. 35.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Fun facts (c) Rain today
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h2>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  38. 38.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) about.html (b) About us (c) games.html (d) contact.html
  39. 39.True or false: <meta> has a closing tag. (a) True (b) False
  40. 40.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) very big text (d) secret text

Answer key

  1. Play games
  2. False
  3. in the same tab
  4. in the head
  5. <h1>
  6. a web server
  7. element
  8. <h6>
  9. quiz.html
  10. <li>
  11. a slash /
  12. True
  13. a code editor
  14. 250
  15. in a new tab
  16. Match report
  17. <h1>
  18. 2
  19. starts a new line
  20. line 3
  21. </p>
  22. an empty tag
  23. kite.png
  24. A happy dog
  25. 3
  26. <h6>
  27. <h1>
  28. Yes
  29. an opening tag
  30. Yes
  31. games.html
  32. Yes
  33. 6
  34. <ol>
  35. has a closing tag
  36. Hello, world!
  37. <h4>
  38. games.html
  39. False
  40. text with links

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