← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 94 · 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 list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  2. 2.True or false: <ul> lists steps in order. (a) True (b) False
  3. 3.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) about.html (b) https://example.com (c) Play games (d) contact.html
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
  5. 5.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
  6. 6.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>
  7. 7.Which of these is true of a web browser? (a) sends pages over the net (b) shows line numbers (c) saves our .html files (d) opens web pages for us
  8. 8.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="400">
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Welcome! (d) Thanks for visiting.
  11. 11.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <u>My pets
    <strong>Rain today</strong>
    (a) </p> (b) </i> (c) </u> (d) </strong>
  12. 12.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  13. 13.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) About us (c) Contact us (d) games.html
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) width (b) Map of India (c) map.png (d) Birthday cake
  15. 15.Which of these is true of a code editor? (a) sends pages over the net (b) turns HTML into a page (c) is where we type code (d) stores a website’s files
  16. 16.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  18. 18.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  19. 19.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  20. 20.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  21. 21.🔍 One closing tag is missing. Which one?
    <u>Good morning!
    <h2>Our school trip</h2>
    <h3>Fun facts</h3>
    (a) </h2> (b) </h3> (c) </h1> (d) </u>
  22. 22.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h6>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) Fun facts (b) My pets (c) Our school trip (d) Hello, world!
  24. 24.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  26. 26.Which of these is an opening tag? (a) </title> (b) <p> (c) </body> (d) </li>
  27. 27.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  28. 28.True or false: <title> is an empty tag. (a) True (b) False
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Rain today</p>
    (a) Fun facts (b) The red kite (c) Rain today (d) Cricket is fun.
  30. 30.True or false: <p> has a closing tag. (a) True (b) False
  31. 31.📄 Can HTML on its own make headings? (a) Yes (b) No
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  33. 33.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  34. 34.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Good morning!</p> -->
  35. 35.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
  36. 36.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
  37. 37.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  38. 38.True or false: <p> is an empty tag. (a) True (b) False
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) Map of India (b) A red kite (c) width (d) kite.png

Answer key

  1. <ol>
  2. False
  3. about.html
  4. 2
  5. structure
  6. </h3>
  7. opens web pages for us
  8. in a new tab
  9. 400
  10. Welcome!
  11. </u>
  12. 2
  13. About us
  14. Map of India
  15. is where we type code
  16. No
  17. element
  18. <a href="about.html">
  19. href
  20. <ul>
  21. </u>
  22. <h6>
  23. My pets
  24. in the body
  25. 1
  26. <p>
  27. a web server
  28. False
  29. Fun facts
  30. True
  31. Yes
  32. 6
  33. in the body
  34. 1
  35. <!DOCTYPE html>
  36. </strong>
  37. an attribute
  38. False
  39. <h3>
  40. A red kite

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