← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 751 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high</p>
  2. 2.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
  5. 5.True or false: a web server answers page requests. (a) True (b) False
  6. 6.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
  7. 7.True or false: HTML on its own can add up two numbers. (a) False (b) True
  8. 8.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
  9. 9.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Good morning!</h4>
    <h3>My pets</h3>
  10. 10.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) colours code to help us (d) hosts websites online
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) Planets (d) Riya’s Recipes
  13. 13.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
  14. 14.Which of these is an opening tag? (a) </title> (b) </b> (c) </li> (d) <p>
  15. 15.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) about.html (b) Contact us (c) quiz.html (d) games.html
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ul>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!</h1>
    line 2: <strong>I love mangoes.</strong>
    line 3: <p>Cricket is fun.
    (a) line 1 (b) line 2 (c) line 3
  18. 18.Which of these has a closing tag? (a) <p> (b) <input> (c) <meta> (d) <br>
  19. 19.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
  20. 20.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) about.html (c) contact.html (d) games.html
  21. 21.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) saves our .html files (d) stores a website’s files
  22. 22.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Rain today</p>
    <h2>My pets</h2>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
  23. 23.True or false: HTML on its own can keep a high score. (a) True (b) False
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  25. 25.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  26. 26.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
  27. 27.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Good morning!</p>
    <h4>I love mangoes.</h4>
  28. 28.Which of these is a closing tag? (a) <li> (b) </p> (c) <h1> (d) <p>
  29. 29.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) Map of India (b) kite.png (c) width (d) A red kite
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) Fun facts (b) My pets (c) Hello, world! (d) My best friend
  32. 32.True or false: HTML on its own can make a form. (a) False (b) True
  33. 33.🔍 One closing tag is missing. Which one?
    <small>My best friend
    <h1>I love mangoes.</h1>
    <em>Fun facts</em>
    (a) </em> (b) </h1> (c) </h3> (d) </small>
  34. 34.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) colours code to help us
  35. 35.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  36. 36.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  37. 37.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) </html> (d) <html>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <i>My best friend</i>
    line 2: <p>Fun facts</p>
    line 3: <b>The red kite
    (a) line 1 (b) line 3 (c) line 2
  39. 39.True or false: HTML on its own cannot make tables. (a) True (b) False
  40. 40.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>

Answer key

  1. 3
  2. in the body
  3. an opening tag
  4. a paragraph
  5. True
  6. src
  7. False
  8. 2
  9. 3
  10. an empty tag
  11. colours code to help us
  12. Planets
  13. <h1>
  14. <p>
  15. quiz.html
  16. 3
  17. line 3
  18. <p>
  19. text with links
  20. games.html
  21. saves our .html files
  22. 4
  23. False
  24. 2
  25. <img>
  26. src
  27. 2
  28. </p>
  29. element
  30. A red kite
  31. My best friend
  32. True
  33. </small>
  34. stores a website’s files
  35. in a new tab
  36. <head>
  37. </html>
  38. line 3
  39. False
  40. <ol>

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