← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 84 · 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.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  2. 2.🔍 Which is the odd one out? (a) answers page requests (b) opens web pages for us (c) stores a website’s files (d) hosts websites online
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
  4. 4.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
  5. 5.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <p>Our school trip</p>
  6. 6.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
  7. 7.True or false: HTML on its own can make headings. (a) True (b) False
  8. 8.🔍 One closing tag is missing. Which one?
    <small>Our school trip</small>
    <h2>Good morning!
    <b>The red kite</b>
    (a) </small> (b) </b> (c) </strong> (d) </h2>
  9. 9.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) My drawings (d) Mars is red.
  11. 11.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  12. 12.Which of these is a closing tag? (a) <li> (b) <p> (c) </title> (d) <body>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.</b>
    line 2: <em>My best friend
    line 3: <small>Good morning!</small>
    (a) line 2 (b) line 3 (c) line 1
  14. 14.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  15. 15.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a music player (d) a web browser
  16. 16.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  17. 17.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  18. 18.True or false: in <img>, alt describes the picture. (a) False (b) True
  19. 19.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.
    <h1>Rain today</h1>
    <em>My best friend</em>
    (a) </h3> (b) </u> (c) </em> (d) </h1>
  20. 20.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  21. 21.True or false: in <img>, width sets how wide it is. (a) False (b) True
  22. 22.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) contact.html (b) Play games (c) games.html (d) about.html
  23. 23.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!
    line 2: <h1>Our school trip</h1>
    line 3: <u>Rain today</u>
    (a) line 2 (b) line 3 (c) line 1
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) The red kite (d) Hello, world!
  26. 26.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  27. 27.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h4>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
  29. 29.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Our school trip (b) Hello, world! (c) My best friend (d) Rain today
  32. 32.True or false: a web browser has an address bar. (a) False (b) True
  33. 33.Which of these is a closing tag? (a) </b> (b) <p> (c) <b> (d) <h1>
  34. 34.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="200">
  37. 37.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  40. 40.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) games.html (b) contact.html (c) About us (d) about.html

Answer key

  1. 6
  2. opens web pages for us
  3. <h1>
  4. Language
  5. 1
  6. 1
  7. True
  8. </h2>
  9. has a closing tag
  10. My drawings
  11. 3
  12. </title>
  13. line 2
  14. numbers
  15. a web browser
  16. <ul>
  17. a web browser
  18. True
  19. </u>
  20. width
  21. True
  22. games.html
  23. <h5>
  24. line 1
  25. The red kite
  26. <h1>
  27. <li>
  28. <h2>
  29. to describe the image
  30. 2
  31. My best friend
  32. True
  33. </b>
  34. 4
  35. 100
  36. 200
  37. has a closing tag
  38. an empty tag
  39. a web server
  40. games.html

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