← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 502 · 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.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  2. 2.True or false: <ol> is an ordered list. (a) True (b) False
  3. 3.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  5. 5.Which of these is an opening tag? (a) </h1> (b) </title> (c) <b> (d) </p>
  6. 6.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  7. 7.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  8. 8.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Good morning!</p>
    <h3>I love mangoes.</h3>
    <h2>The red kite</h2>
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  10. 10.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <li>
  11. 11.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  13. 13.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
  14. 14.🔗 Where does this link open?
    <a href="about.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  15. 15.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) games.html (b) href (c) Maths fun (d) Art corner
  16. 16.🔍 One closing tag is missing. Which one?
    <p>Our school trip</p>
    <em>Good morning!</em>
    <b>Cricket is fun.
    (a) </h1> (b) </p> (c) </b> (d) </em>
  17. 17.🔗 Where does this link open?
    <a href="games.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep
  19. 19.True or false: a web browser answers page requests. (a) False (b) True
  20. 20.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My best friend</h4>
    <h3>Rain today</h3>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  22. 22.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  24. 24.True or false: in <img>, src describes the picture. (a) True (b) False
  25. 25.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
  26. 26.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  27. 27.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
  28. 28.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) fort.jpg (b) An old fort (c) width (d) A tiger asleep
  30. 30.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
  32. 32.True or false: <b> has a closing tag. (a) False (b) True
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog
  34. 34.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  35. 35.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    (a) Fun facts (b) Hello, world! (c) My best friend (d) My pets
  37. 37.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  38. 38.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a printer (d) a microphone
  39. 39.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  40. 40.📋 What number does the browser show next to “Banana”?
    <ol start="5">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>

Answer key

  1. to leave notes
  2. True
  3. </h1>
  4. 250
  5. <b>
  6. in the same tab
  7. bullets
  8. 3
  9. 2
  10. </p>
  11. a web browser
  12. bullets
  13. <h6>
  14. in the same tab
  15. Maths fun
  16. </b>
  17. in a new tab
  18. A tiger asleep
  19. False
  20. 3
  21. 300
  22. has a closing tag
  23. A red kite
  24. False
  25. <head>
  26. <
  27. <h5>
  28. <ul>
  29. An old fort
  30. opens it in a new tab
  31. 3
  32. True
  33. Birthday cake
  34. 3
  35. <a>
  36. My pets
  37. element
  38. a plain text editor
  39. in the same tab
  40. 9

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