← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 105 · 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) <br> (b) <ul> (c) <hr> (d) <ol>
  2. 2.True or false: <li> has a closing tag. (a) False (b) True
  3. 3.True or false: in <img>, height sets how wide it is. (a) True (b) False
  4. 4.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.Which of these is true of a web browser? (a) has an address bar (b) colours code to help us (c) saves our .html files (d) answers page requests
  6. 6.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  8. 8.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
  9. 9.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  10. 10.True or false: <ul> is one item of a list. (a) False (b) True
  11. 11.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width
  13. 13.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  14. 14.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.
    line 2: <h3>Hello, world!</h3>
    line 3: <em>Fun facts</em>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) href (c) contact.html (d) Visit the site
  17. 17.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  18. 18.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  19. 19.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
  20. 20.Which of these is an opening tag? (a) </h1> (b) </li> (c) <b> (d) </title>
  21. 21.Which of these goes in the body? (a) <title> (b) <img> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  22. 22.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  23. 23.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  24. 24.Which of these is a closing tag? (a) <li> (b) <b> (c) </body> (d) <title>
  25. 25.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
  27. 27.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Good morning!</p>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
  30. 30.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Cricket is fun. (c) Hello, world! (d) Rain today
  31. 31.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.
    line 2: <h3>Our school trip</h3>
    line 3: <strong>My pets</strong>
    (a) line 1 (b) line 2 (c) line 3
  34. 34.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </html> (c) <head> (d) <!DOCTYPE html>
  35. 35.True or false: <ul> goes in the head. (a) True (b) False
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    (a) Fun facts (b) Our school trip (c) Cricket is fun.
  37. 37.True or false: <ul> goes in the body. (a) False (b) True
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <p>Cricket is fun.</p>
    line 3: <h1>I love mangoes.</h1>
    (a) line 1 (b) line 2 (c) line 3
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Thanks for visiting. (c) Easy snacks (d) body
  40. 40.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg

Answer key

  1. <ol>
  2. True
  3. False
  4. in the body
  5. has an address bar
  6. in the head
  7. 6
  8. an attribute
  9. <a>
  10. False
  11. src
  12. Birthday cake
  13. 2
  14. Yes
  15. line 1
  16. Contact us
  17. the body
  18. starts a new line
  19. </small>
  20. <b>
  21. <img>
  22. <h5>
  23. in the same tab
  24. </body>
  25. opens it in a new tab
  26. <h6>
  27. </h1>
  28. numbers
  29. 2
  30. Hello, world!
  31. a web server
  32. 2
  33. line 1
  34. <!DOCTYPE html>
  35. False
  36. Fun facts
  37. True
  38. line 1
  39. Easy snacks
  40. dog.jpg

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