← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 453 · 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.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  2. 2.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  3. 3.🔍 One closing tag is missing. Which one?
    <h2>Our school trip</h2>
    <h1>Hello, world!
    <i>I love mangoes.</i>
    (a) </i> (b) </h2> (c) </h1> (d) </p>
  4. 4.Which of these is an opening tag? (a) </p> (b) </h1> (c) </body> (d) <h1>
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
  6. 6.True or false: <h1> goes in the body. (a) False (b) True
  7. 7.🔍 One closing tag is missing. Which one?
    <h3>Fun facts
    <u>I love mangoes.</u>
    <em>Good morning!</em>
    (a) </i> (b) </u> (c) </h3> (d) </em>
  8. 8.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  9. 9.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <h4>I love mangoes.</h4>
  10. 10.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
  11. 11.📄 Can HTML on its own make headings? (a) Yes (b) No
  12. 12.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
  13. 13.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  14. 14.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  15. 15.True or false: <li> goes inside ul or ol. (a) False (b) True
  16. 16.True or false: <hr> has a closing tag. (a) False (b) True
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  18. 18.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) body (c) Riya’s Recipes (d) Planets
  21. 21.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <ul>
  22. 22.🖼️ 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
  23. 23.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) maths.html (c) Contact us (d) About us
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  26. 26.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets</strong>
    line 2: <i>Cricket is fun.</i>
    line 3: <h3>I love mangoes.
    (a) line 2 (b) line 1 (c) line 3
  28. 28.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  29. 29.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  30. 30.True or false: <title> is an empty tag. (a) True (b) False
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) I love mangoes. (b) Our school trip (c) My best friend
  32. 32.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  35. 35.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  36. 36.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  37. 37.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) news.html (c) Visit the site (d) art.html
  38. 38.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <b>Rain today
    line 2: <small>Good morning!</small>
    line 3: <strong>Fun facts</strong>
    (a) line 3 (b) line 1 (c) line 2
  40. 40.True or false: <meta> has a closing tag. (a) False (b) True

Answer key

  1. <
  2. No
  3. </h1>
  4. <h1>
  5. <h2>
  6. True
  7. </h3>
  8. to leave notes
  9. 2
  10. src
  11. Yes
  12. HyperText
  13. 2
  14. <a href="about.html">
  15. True
  16. False
  17. 1
  18. <img>
  19. bullets
  20. Planets
  21. <title>
  22. to describe the image
  23. -->
  24. About us
  25. <h5>
  26. <!--
  27. line 3
  28. True
  29. the body
  30. False
  31. Our school trip
  32. an opening tag
  33. 400
  34. <h1>
  35. <a>
  36. <li>
  37. art.html
  38. in the body
  39. line 1
  40. False

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