← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 491 · 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.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  2. 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  3. 3.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  4. 4.True or false: HTML on its own can make links to pages. (a) True (b) False
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today
    line 2: <i>Our school trip</i>
    line 3: <h1>Hello, world!</h1>
    (a) line 3 (b) line 2 (c) line 1
  6. 6.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
  8. 8.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h2>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  10. 10.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  11. 11.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  12. 12.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
  13. 13.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) The red kite (b) Fun facts (c) My pets (d) My best friend
  14. 14.Which of these is an empty tag? (a) <h1> (b) <p> (c) <meta> (d) <b>
  15. 15.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) My pets (c) My best friend (d) Good morning!
  16. 16.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) href (c) About us (d) games.html
  18. 18.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) opens web pages for us
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Kites fly high</p>
  21. 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  22. 22.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  23. 23.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) All about me (d) Here is my best one.
  27. 27.Which of these is a closing tag? (a) <h1> (b) <title> (c) <b> (d) </p>
  28. 28.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  29. 29.True or false: in <img>, alt names the picture file. (a) True (b) False
  30. 30.True or false: <p> has a closing tag. (a) True (b) False
  31. 31.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  32. 32.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) href (b) maths.html (c) Visit the site (d) Maths fun
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <b>The red kite</b>
    line 2: <h2>Hello, world!
    line 3: <p>Good morning!</p>
    (a) line 1 (b) line 3 (c) line 2
  34. 34.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  35. 35.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Stars shine</p>
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  39. 39.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  40. 40.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor

Answer key

  1. Yes
  2. <h1>
  3. in a new tab
  4. True
  5. line 1
  6. 2
  7. <h1>
  8. 1
  9. <h6>
  10. to describe the image
  11. <h5>
  12. a line across the page
  13. The red kite
  14. <meta>
  15. My best friend
  16. an empty tag
  17. About us
  18. a closing tag
  19. opens web pages for us
  20. 3
  21. <h3>
  22. <h1>
  23. <body>
  24. <h1>
  25. element
  26. All about me
  27. </p>
  28. 5
  29. False
  30. True
  31. on the browser tab
  32. Visit the site
  33. line 2
  34. <!--
  35. 4
  36. 3
  37. 5
  38. <h5>
  39. False
  40. a code editor

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