← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 881 · 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.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  2. 2.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  3. 3.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  4. 4.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  5. 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  6. 6.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  7. 7.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!</h3>
    line 2: <b>Hello, world!</b>
    line 3: <i>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  9. 9.📄 Can HTML on its own make a form? (a) Yes (b) No
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Try this poha. (c) Easy snacks (d) Cricket Club
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  12. 12.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  14. 14.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <table> (c) <ul> (d) <a>
  15. 15.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  16. 16.True or false: <ul> is one item of a list. (a) False (b) True
  17. 17.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
  18. 18.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) art.html (c) https://example.com (d) maths.html
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h3>
  20. 20.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  21. 21.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  22. 22.Which of these is true of a web browser? (a) shows line numbers (b) sends pages over the net (c) has an address bar (d) hosts websites online
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) bus.jpg (b) width (c) An old fort (d) Our school bus
  24. 24.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting.
  27. 27.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <p>
  28. 28.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) </body>
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) All about me (c) Art Gallery (d) Here is my best one.
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <h1>Rain today
    line 3: <h3>My best friend</h3>
    (a) line 2 (b) line 3 (c) line 1
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  32. 32.🔍 Which is the odd one out? (a) hosts websites online (b) turns HTML into a page (c) opens web pages for us (d) has an address bar
  33. 33.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) Contact us (c) contact.html (d) About us
  34. 34.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
  35. 35.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  37. 37.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) turns HTML into a page (d) sends pages over the net
  38. 38.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) saves our .html files
  39. 39.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <b>Our school trip</b>
    line 2: <strong>Rain today
    line 3: <h3>My best friend</h3>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. opens it in a new tab
  2. <h5>
  3. <ol>
  4. 3
  5. href
  6. True
  7. a line across the page
  8. line 3
  9. Yes
  10. Cricket Club
  11. 1
  12. an opening tag
  13. 6
  14. <link rel="stylesheet">
  15. No
  16. False
  17. <head>
  18. https://example.com
  19. <h6>
  20. <ol>
  21. False
  22. has an address bar
  23. Our school bus
  24. Markup
  25. Birthday cake
  26. Space Facts
  27. <p>
  28. <!DOCTYPE html>
  29. Art Gallery
  30. line 2
  31. <h5>
  32. hosts websites online
  33. About us
  34. 3
  35. <li>
  36. 3
  37. turns HTML into a page
  38. saves our .html files
  39. in the body
  40. line 2

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