← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 445 · 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.True or false: <li> is an unordered list. (a) True (b) False
  2. 2.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  3. 3.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) colours code to help us
  5. 5.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="300">
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) The red kite (b) Good morning! (c) Fun facts (d) Our school trip
  8. 8.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  9. 9.Which of these is an opening tag? (a) </li> (b) </p> (c) </title> (d) <title>
  10. 10.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) https://example.com (b) Art corner (c) href (d) Maths fun
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) width (d) src
  12. 12.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  14. 14.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  15. 15.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
  16. 16.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Match report (b) Cricket Club (c) body (d) Here is my best one.
  19. 19.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today
    line 2: <u>The red kite</u>
    line 3: <b>Hello, world!</b>
    (a) line 3 (b) line 1 (c) line 2
  21. 21.Which of these goes in the head? (a) <img> (b) <p> (c) <a> (d) <link rel="stylesheet">
  22. 22.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  23. 23.🔗 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
  24. 24.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3> (d) <h3/>
  25. 25.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </html> (b) </body>
  26. 26.Which of these is true of a web server? (a) turns HTML into a page (b) is where we type code (c) answers page requests (d) colours code to help us
  27. 27.📋 What number does the browser show next to “Litchi”?
    <ol start="4">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) Cricket Club (d) I like to read.
  29. 29.True or false: a web server is where we type code. (a) True (b) False
  30. 30.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) colours code to help us (d) shows pages from the web
  31. 31.True or false: <ul> is one item of a list. (a) False (b) True
  32. 32.Which of these is an opening tag? (a) </h1> (b) </li> (c) </p> (d) <p>
  33. 33.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) news.html (b) href (c) Contact us (d) About us
  34. 34.📋 What number does the browser show next to “Mango”?
    <ol start="2">
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  35. 35.💬 How does an HTML comment start? (a) <!-- (b) /* (c) # (d) //
  36. 36.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
  37. 37.Which of these has a closing tag? (a) <input> (b) <img> (c) <br> (d) <h1>
  38. 38.True or false: HTML on its own can make headings. (a) True (b) False
  39. 39.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  40. 40.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. False
  2. to leave notes
  3. in the head
  4. colours code to help us
  5. a line across the page
  6. 300
  7. Fun facts
  8. <ul>
  9. <title>
  10. Maths fun
  11. alt
  12. 6
  13. 250
  14. -->
  15. on the browser tab
  16. an empty tag
  17. alt
  18. Match report
  19. a web server
  20. line 1
  21. <link rel="stylesheet">
  22. Language
  23. opens it in a new tab
  24. </h3>
  25. </body>
  26. answers page requests
  27. 5
  28. Welcome!
  29. False
  30. shows pages from the web
  31. False
  32. <p>
  33. About us
  34. 4
  35. <!--
  36. <body>
  37. <h1>
  38. True
  39. a web browser
  40. an opening tag

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