← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 840 · 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 is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) opens web pages for us
  2. 2.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
  3. 3.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
  5. 5.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  6. 6.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  7. 7.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width
  9. 9.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
  10. 10.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  11. 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  12. 12.🔗 Where does this link open?
    <a href="games.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  13. 13.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  14. 14.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  15. 15.Which of these is an opening tag? (a) </li> (b) </p> (c) <p> (d) </title>
  16. 16.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) about.html (b) quiz.html (c) Art corner (d) games.html
  17. 17.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <body> (d) <head>
  18. 18.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) shows pages from the web (d) answers page requests
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  20. 20.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <em>My pets
    <strong>Cricket is fun.</strong>
    (a) </h2> (b) </em> (c) </strong> (d) </h3>
  21. 21.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Roses are red</p>
  24. 24.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    (a) Good morning! (b) The red kite (c) Cricket is fun. (d) I love mangoes.
  25. 25.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  26. 26.🔍 Which is the odd one out? (a) is where we type code (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  28. 28.🔍 One closing tag is missing. Which one?
    <p>The red kite
    <h2>Our school trip</h2>
    <b>Hello, world!</b>
    (a) </p> (b) </h2> (c) </b> (d) </em>
  29. 29.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) games.html (b) contact.html (c) Contact us (d) about.html
  30. 30.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) https://example.com (b) Play games (c) href (d) Take the quiz
  32. 32.True or false: <input> is an empty tag. (a) True (b) False
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Stars shine</p>
  36. 36.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>My pets</h2>
    <p>My best friend</p>
    <h2>Rain today</h2>
    <p>Cricket is fun.</p>
  37. 37.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  38. 38.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  39. 39.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    (a) My pets (b) Fun facts (c) Rain today
  40. 40.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank

Answer key

  1. opens web pages for us
  2. <h1>
  3. an empty tag
  4. <
  5. href
  6. No
  7. a closing tag
  8. An old fort
  9. to leave notes
  10. a line across the page
  11. 6
  12. in the same tab
  13. Markup
  14. a web server
  15. <p>
  16. quiz.html
  17. </html>
  18. answers page requests
  19. 1
  20. </em>
  21. 2
  22. 250
  23. 3
  24. Good morning!
  25. <a>
  26. is where we type code
  27. bullets
  28. </p>
  29. games.html
  30. in the head
  31. Take the quiz
  32. True
  33. <h6>
  34. The full moon
  35. 3
  36. 3
  37. 3
  38. 8
  39. Fun facts
  40. opens it in a new tab

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