← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 4 · 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 heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  2. 2.Which of these has a closing tag? (a) <meta> (b) <li> (c) <br> (d) <input>
  3. 3.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Take the quiz (b) about.html (c) href (d) Play games
  4. 4.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My pets</h4>
    <h2>My pets</h2>
  5. 5.True or false: a web server answers page requests. (a) False (b) True
  6. 6.True or false: <title> goes in the head. (a) True (b) False
  7. 7.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  8. 8.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My pets</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  9. 9.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h5> (d) <h1>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
  12. 12.📝 What does <br> do? (a) starts a new line (b) makes a list (c) adds a picture (d) makes text bold
  13. 13.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
  14. 14.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) moon.png (b) cake.jpg (c) Birthday cake (d) dog.jpg
  15. 15.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  16. 16.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  18. 18.Which of these has a closing tag? (a) <title> (b) <br> (c) <meta> (d) <hr>
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="250">
    (a) Our school bus (b) width (c) moon.png (d) The full moon
  20. 20.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) sends pages over the net (d) is where we type code
  21. 21.True or false: in <img>, src tells which image to load. (a) True (b) False
  22. 22.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) contact.html (c) Maths fun (d) about.html
  23. 23.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) art.html (b) https://example.com (c) maths.html (d) School news
  24. 24.🔗 What does HyperText mean? (a) very big text (b) text with links (c) secret text (d) text in colour
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <p>Hello, world!</p>
    line 2: <i>Cricket is fun.
    line 3: <h2>The red kite</h2>
    (a) line 2 (b) line 1 (c) line 3
  26. 26.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  27. 27.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  28. 28.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) My pets (b) Rain today (c) Our school trip
  29. 29.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  30. 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Match report (d) Cricket Club
  33. 33.💬 Does the browser show comments on the page? (a) No (b) Yes
  34. 34.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
  36. 36.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Mouse (d) Machine
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Art Gallery (b) Here is my best one. (c) index.html (d) All about me
  38. 38.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) </small> (d) <small/>
  39. 39.Which of these is a closing tag? (a) <h1> (b) </body> (c) <li> (d) <p>
  40. 40.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) href (c) Play games (d) About us

Answer key

  1. <h1>
  2. <li>
  3. Take the quiz
  4. 3
  5. True
  6. True
  7. No
  8. 1
  9. a slash /
  10. <h1>
  11. <h6>
  12. starts a new line
  13. width
  14. cake.jpg
  15. <h1>
  16. No
  17. 1
  18. <title>
  19. The full moon
  20. has an address bar
  21. True
  22. about.html
  23. https://example.com
  24. text with links
  25. line 2
  26. -->
  27. an empty tag
  28. Rain today
  29. a code editor
  30. Yes
  31. 6
  32. Cricket Club
  33. No
  34. False
  35. 2
  36. Markup
  37. Art Gallery
  38. </small>
  39. </body>
  40. Play games

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