← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 372 · 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.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <h3>The red kite</h3>
    <p>Fun facts</p>
  2. 2.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  3. 3.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  4. 4.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  6. 6.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  7. 7.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
  8. 8.🔍 One closing tag is missing. Which one?
    <h2>Our school trip
    <u>Fun facts</u>
    <small>My pets</small>
    (a) </small> (b) </strong> (c) </h2> (d) </u>
  9. 9.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  10. 10.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  12. 12.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  13. 13.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
  14. 14.True or false: <br> has a closing tag. (a) True (b) False
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  16. 16.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
  17. 17.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>The red kite</h3>
    <p>My best friend</p>
    <p>Our school trip</p>
    <h3>Rain today</h3>
  18. 18.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <h2>Cricket is fun.</h2>
    <p>The red kite</p>
  19. 19.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  20. 20.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  21. 21.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  22. 22.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) </u> (d) <u>
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) index.html (c) My Hobbies (d) I like to read.
  24. 24.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  25. 25.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts
    line 2: <strong>Cricket is fun.</strong>
    line 3: <u>Our school trip</u>
    (a) line 2 (b) line 1 (c) line 3
  28. 28.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg
  29. 29.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
  30. 30.True or false: a code editor shows line numbers. (a) False (b) True
  31. 31.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  32. 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
  33. 33.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) art.html (b) Visit the site (c) href (d) Maths fun
  34. 34.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <p>
  35. 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  37. 37.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  38. 38.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) is where we type code
  39. 39.🔍 One closing tag is missing. Which one?
    <h1>Good morning!
    <h3>Cricket is fun.</h3>
    <i>The red kite</i>
    (a) </i> (b) </small> (c) </h3> (d) </h1>
  40. 40.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers

Answer key

  1. 2
  2. True
  3. a web server
  4. <img>
  5. A happy dog
  6. <a>
  7. alt
  8. </h2>
  9. a closing tag
  10. a web browser
  11. 1
  12. on the browser tab
  13. 3
  14. False
  15. 1
  16. </p>
  17. 3
  18. 3
  19. 2
  20. <h2>
  21. in the same tab
  22. </u>
  23. My Hobbies
  24. a code editor
  25. an empty tag
  26. opens it in a new tab
  27. line 1
  28. bus.jpg
  29. 4
  30. True
  31. <h2>
  32. Yes
  33. Visit the site
  34. <p>
  35. alt
  36. <h4>
  37. numbers
  38. shows pages from the web
  39. </h1>
  40. bullets

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