← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 676 · 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 is the odd one out? (a) shows line numbers (b) answers page requests (c) sends pages over the net (d) stores a website’s files
  2. 2.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    (a) Rain today (b) I love mangoes. (c) The red kite (d) My pets
  3. 3.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  5. 5.Which of these goes in the body? (a) <p> (b) <meta charset="utf-8"> (c) <title> (d) <link rel="stylesheet">
  6. 6.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  7. 7.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
  8. 8.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) dog.jpg (b) A happy dog (c) bus.jpg (d) moon.png
  10. 10.Which of these is an opening tag? (a) </h1> (b) <h1> (c) </b> (d) </p>
  11. 11.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  12. 12.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  13. 13.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  14. 14.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
  15. 15.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting.
  17. 17.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
  18. 18.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>The red kite</h2>
    <h2>My best friend</h2>
  19. 19.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  20. 20.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <p>My best friend</p>
  21. 21.Which of these is true of a code editor? (a) answers page requests (b) shows pages from the web (c) sends pages over the net (d) colours code to help us
  22. 22.True or false: a code editor colours code to help us. (a) False (b) True
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  24. 24.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>My pets</h3>
    <h2>Good morning!</h2>
    <h3>My best friend</h3>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.</h3>
    line 2: <h2>Good morning!
    line 3: <em>Rain today</em>
    (a) line 1 (b) line 2 (c) line 3
  26. 26.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>The red kite</h2>
  27. 27.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  28. 28.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Rain today</h2>
    <h2>Fun facts</h2>
  29. 29.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  30. 30.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    (a) My best friend (b) Our school trip (c) Rain today (d) My pets
  31. 31.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  32. 32.Which of these is a closing tag? (a) <body> (b) </b> (c) <h1> (d) <title>
  33. 33.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) about.html (d) https://example.com
  34. 34.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) href (c) https://example.com (d) Art corner
  35. 35.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  36. 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  37. 37.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) Art corner (b) href (c) maths.html (d) Maths fun
  38. 38.True or false: <li> goes inside ul or ol. (a) False (b) True
  39. 39.Which of these is a closing tag? (a) </title> (b) <p> (c) <title> (d) <b>
  40. 40.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    (a) Cricket is fun. (b) My pets (c) Good morning! (d) My best friend

Answer key

  1. shows line numbers
  2. Rain today
  3. stores a website’s files
  4. 5
  5. <p>
  6. False
  7. structure
  8. 5
  9. dog.jpg
  10. <h1>
  11. Yes
  12. <ul>
  13. <h6>
  14. <h5>
  15. </p>
  16. Space Facts
  17. alt
  18. 3
  19. -->
  20. 3
  21. colours code to help us
  22. True
  23. 2
  24. 4
  25. line 2
  26. 2
  27. Language
  28. 3
  29. src
  30. My pets
  31. in the same tab
  32. </b>
  33. about.html
  34. Art corner
  35. 2
  36. 6
  37. Maths fun
  38. True
  39. </title>
  40. Cricket is fun.

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