← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 323 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  3. 3.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
  4. 4.🔍 One closing tag is missing. Which one?
    <h2>Rain today</h2>
    <i>Hello, world!
    <b>My pets</b>
    (a) </b> (b) </small> (c) </i> (d) </h2>
  5. 5.📋 What number does the browser show next to “Guava”?
    <ol start="6">
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  6. 6.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  7. 7.Which of these is an opening tag? (a) </b> (b) </h1> (c) <title> (d) </p>
  8. 8.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  9. 9.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) opens web pages for us (d) saves our .html files
  10. 10.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) href (b) https://example.com (c) Visit the site (d) Contact us
  11. 11.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) An old fort (b) kite.png (c) tiger.jpg (d) fort.jpg
  12. 12.Which of these is a closing tag? (a) <p> (b) <body> (c) <li> (d) </title>
  13. 13.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Easy snacks (b) Space Facts (c) Mars is red. (d) index.html
  15. 15.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
  16. 16.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!
    <p>My best friend</p>
    <u>I love mangoes.</u>
    (a) </p> (b) </u> (c) </h2> (d) </h1>
  17. 17.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <img> (d) <title>
  18. 18.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
  19. 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.True or false: <input> is an empty tag. (a) False (b) True
  21. 21.True or false: <style> goes in the head. (a) False (b) True
  22. 22.Which of these is a closing tag? (a) </p> (b) <h1> (c) <p> (d) <body>
  23. 23.True or false: HTML on its own can make links to pages. (a) True (b) False
  24. 24.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  25. 25.💬 Does the browser show comments on the page? (a) No (b) Yes
  26. 26.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) Contact us (c) About us (d) maths.html
  27. 27.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
  28. 28.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  29. 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  30. 30.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) art.html (b) Maths fun (c) maths.html (d) https://example.com
  31. 31.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  32. 32.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  33. 33.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>The red kite</h2>
  34. 34.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  35. 35.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  38. 38.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  39. 39.Which of these is true of a code editor? (a) sends pages over the net (b) stores a website’s files (c) shows line numbers (d) answers page requests
  40. 40.Which of these has a closing tag? (a) <input> (b) <ul> (c) <img> (d) <hr>

Answer key

  1. A tiger asleep
  2. A happy dog
  3. a code editor
  4. </i>
  5. 10
  6. <h1>
  7. <title>
  8. 2
  9. saves our .html files
  10. Contact us
  11. fort.jpg
  12. </title>
  13. an opening tag
  14. Space Facts
  15. width
  16. </h2>
  17. <img>
  18. a paragraph
  19. in the head
  20. True
  21. True
  22. </p>
  23. True
  24. 5
  25. No
  26. About us
  27. 1
  28. No
  29. No
  30. https://example.com
  31. <a>
  32. opens it in a new tab
  33. 5
  34. <h6>
  35. a closing tag
  36. bullets
  37. <h1>
  38. <ol>
  39. shows line numbers
  40. <ul>

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