← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 388 · 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 one answers page requests? (a) a web server (b) a web browser (c) a code editor
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <p>Rain today</p>
    line 3: <b>Our school trip</b>
    (a) line 1 (b) line 3 (c) line 2
  3. 3.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  4. 4.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  5. 5.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) colours code to help us (d) sends pages over the net
  6. 6.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  8. 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="350">
  11. 11.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  12. 12.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
  13. 13.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    (a) Fun facts (b) Hello, world! (c) Rain today
  14. 14.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  15. 15.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  18. 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.Which of these is an opening tag? (a) </title> (b) </b> (c) <h1> (d) </p>
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <b>Hello, world!
    line 2: <h1>Our school trip</h1>
    line 3: <h3>I love mangoes.</h3>
    (a) line 2 (b) line 1 (c) line 3
  21. 21.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
  22. 22.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My pets (c) Cricket is fun.
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Hello, world! (c) I love mangoes.
  24. 24.True or false: <li> is an empty tag. (a) False (b) True
  25. 25.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
  27. 27.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  28. 28.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  29. 29.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  30. 30.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  31. 31.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  33. 33.Which of these has a closing tag? (a) <meta> (b) <br> (c) <img> (d) <h1>
  34. 34.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  35. 35.Which of these is an opening tag? (a) </b> (b) </p> (c) <body> (d) </h1>
  36. 36.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  37. 37.True or false: HTML on its own can count button clicks. (a) False (b) True
  38. 38.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) https://example.com (b) contact.html (c) Play games (d) maths.html
  39. 39.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  40. 40.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) has an address bar (d) hosts websites online

Answer key

  1. a web server
  2. line 1
  3. a web browser
  4. 2
  5. colours code to help us
  6. an opening tag
  7. a paragraph
  8. has a closing tag
  9. <!DOCTYPE html>
  10. 350
  11. href
  12. saves our .html files
  13. Fun facts
  14. in a new tab
  15. in the body
  16. in the head
  17. No
  18. in the head
  19. <h1>
  20. line 1
  21. 4
  22. Cricket is fun.
  23. I love mangoes.
  24. False
  25. <a>
  26. 3
  27. a code editor
  28. a web browser
  29. <h6>
  30. to leave notes
  31. -->
  32. <h4>
  33. <h1>
  34. <html>
  35. <body>
  36. No
  37. False
  38. contact.html
  39. opens it in a new tab
  40. has an address bar

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