← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 27 · 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 of these is true of a web server? (a) colours code to help us (b) is where we type code (c) answers page requests (d) shows line numbers
  2. 2.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  3. 3.📋 What number does the browser show next to “Papaya”?
    <ol start="6">
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    (a) My best friend (b) The red kite (c) My pets
  5. 5.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
  6. 6.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) href (c) Visit the site (d) art.html
  7. 7.Which of these is an empty tag? (a) <ul> (b) <p> (c) <li> (d) <meta>
  8. 8.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  9. 9.Which of these is true of a web server? (a) is where we type code (b) has an address bar (c) shows line numbers (d) stores a website’s files
  10. 10.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  11. 11.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  12. 12.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>The red kite</p>
  13. 13.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.True or false: a web browser saves our .html files. (a) False (b) True
  15. 15.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  16. 16.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  17. 17.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <h2>My pets</h2>
    <h2>Fun facts</h2>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="400">
  19. 19.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  20. 20.📄 Can HTML on its own make tables? (a) Yes (b) No
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <p>Hello, world!</p>
    line 3: <em>Rain today</em>
    (a) line 2 (b) line 1 (c) line 3
  22. 22.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) href (b) Contact us (c) about.html (d) Visit the site
  23. 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) My Hobbies (c) index.html (d) Mars is red.
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  27. 27.True or false: <title> goes in the body. (a) False (b) True
  28. 28.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) body (c) Cricket Club (d) Thanks for visiting.
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) Good morning! (d) Cricket is fun.
  31. 31.🔗 Where does this link open?
    <a href="about.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  33. 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  35. 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  36. 36.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) quiz.html (d) news.html
  37. 37.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) pixels (d) wires
  38. 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  39. 39.Which of these has a closing tag? (a) <img> (b) <br> (c) <ul> (d) <meta>
  40. 40.Which of these is an opening tag? (a) </p> (b) </h1> (c) </b> (d) <title>

Answer key

  1. answers page requests
  2. <li>
  3. 7
  4. My best friend
  5. Language
  6. Contact us
  7. <meta>
  8. <!--
  9. stores a website’s files
  10. 5
  11. True
  12. 1
  13. in the body
  14. False
  15. <h1>
  16. a closing tag
  17. 3
  18. 400
  19. <h4>
  20. Yes
  21. line 1
  22. Contact us
  23. width
  24. My Hobbies
  25. <h5>
  26. 2
  27. False
  28. <h1>
  29. Match report
  30. Cricket is fun.
  31. in a new tab
  32. 150
  33. an empty tag
  34. bullets
  35. opens it in a new tab
  36. news.html
  37. tags
  38. <img>
  39. <ul>
  40. <title>

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