← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 268 · 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.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  2. 2.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  3. 3.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Our school trip</p>
    <h2>My best friend</h2>
    <p>Our school trip</p>
    <p>My best friend</p>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) width (b) tiger.jpg (c) A red kite (d) A tiger asleep
  5. 5.True or false: <li> is one item of a list. (a) False (b) True
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  7. 7.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) Play games (c) art.html (d) maths.html
  8. 8.Which of these is true of a web server? (a) sends pages over the net (b) has an address bar (c) is where we type code (d) colours code to help us
  9. 9.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <strong>Our school trip</strong>
    <b>Rain today</b>
    (a) </h2> (b) </b> (c) </small> (d) </strong>
  10. 10.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
  11. 11.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  12. 12.True or false: HTML on its own can count button clicks. (a) True (b) False
  13. 13.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) href (b) about.html (c) Play games (d) Take the quiz
  14. 14.Which of these is an empty tag? (a) <p> (b) <b> (c) <img> (d) <h1>
  15. 15.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) is where we type code (d) colours code to help us
  16. 16.Which of these is true of a code editor? (a) opens web pages for us (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
  17. 17.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h3>
  18. 18.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h6>
  19. 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <p> (d) <meta charset="utf-8">
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <body> (d) </head>
  21. 21.Which of these is true of a web server? (a) answers page requests (b) colours code to help us (c) saves our .html files (d) has an address bar
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
  23. 23.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
  24. 24.Which of these goes in the head? (a) <img> (b) <ul> (c) <link rel="stylesheet"> (d) <h1>
  25. 25.💬 Does the browser show comments on the page? (a) Yes (b) No
  26. 26.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  27. 27.True or false: in <img>, src sets how tall it is. (a) True (b) False
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) Welcome! (c) My Hobbies (d) We won by 5 runs.
  29. 29.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) I love mangoes. (b) Fun facts (c) My pets
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts</b>
    line 2: <h3>The red kite
    line 3: <p>I love mangoes.</p>
    (a) line 2 (b) line 3 (c) line 1
  31. 31.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) Art corner (b) https://example.com (c) School news (d) href
  32. 32.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  33. 33.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) My pets (c) Cricket is fun.
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <small>My pets
    line 2: <h2>I love mangoes.</h2>
    line 3: <h1>The red kite</h1>
    (a) line 1 (b) line 3 (c) line 2
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Birds sing<br>Stars shine<br>Sky is blue</p>
  36. 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  37. 37.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  38. 38.True or false: <li> shows bullet points. (a) False (b) True
  39. 39.📄 Can HTML on its own make a form? (a) No (b) Yes
  40. 40.🔗 Where does this link open?
    <a href="news.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. numbers
  2. <ol>
  3. 4
  4. A tiger asleep
  5. True
  6. 1
  7. maths.html
  8. sends pages over the net
  9. </small>
  10. to leave notes
  11. a web server
  12. False
  13. Take the quiz
  14. <img>
  15. shows pages from the web
  16. colours code to help us
  17. <h3>
  18. <h2>
  19. <p>
  20. <!DOCTYPE html>
  21. answers page requests
  22. 2
  23. 1
  24. <link rel="stylesheet">
  25. No
  26. numbers
  27. False
  28. My Hobbies
  29. Fun facts
  30. line 2
  31. Art corner
  32. href
  33. My pets
  34. line 1
  35. 5
  36. 6
  37. <ul>
  38. False
  39. Yes
  40. in a new tab

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