← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 455 · 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.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  2. 2.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  3. 3.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
  4. 4.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) Hello, world! (c) I love mangoes.
  5. 5.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) width (b) The full moon (c) dog.jpg (d) A happy dog
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <em>Fun facts</em>
    line 2: <i>Hello, world!
    line 3: <strong>My pets</strong>
    (a) line 3 (b) line 2 (c) line 1
  8. 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.📋 What number does the browser show next to “Jamun”?
    <ol start="8">
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  10. 10.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) Rain today (b) My best friend (c) My pets
  11. 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend
    line 2: <em>My pets</em>
    line 3: <b>Hello, world!</b>
    (a) line 3 (b) line 1 (c) line 2
  13. 13.📋 What number does the browser show next to “Papaya”?
    <ol start="6">
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  14. 14.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  15. 15.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
  16. 16.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h2>The red kite
    line 2: <u>My pets</u>
    line 3: <em>Hello, world!</em>
    (a) line 3 (b) line 2 (c) line 1
  18. 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  19. 19.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  21. 21.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h2>My best friend
    line 2: <h1>I love mangoes.</h1>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 1 (b) line 3 (c) line 2
  23. 23.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  24. 24.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  26. 26.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Easy snacks (c) My Hobbies (d) Thanks for visiting.
  28. 28.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
  29. 29.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) about.html (c) quiz.html (d) games.html
  30. 30.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <body>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg
  32. 32.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  33. 33.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  34. 34.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.True or false: <title> goes in the body. (a) True (b) False
  36. 36.Which of these is an opening tag? (a) <li> (b) </b> (c) </h1> (d) </title>
  37. 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.True or false: <title> goes in the head. (a) False (b) True
  40. 40.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. 9
  2. 4
  3. <h2>
  4. I love mangoes.
  5. <!--
  6. A happy dog
  7. line 2
  8. in the body
  9. 10
  10. My best friend
  11. <ol>
  12. line 1
  13. 7
  14. 2
  15. height
  16. <html>
  17. line 1
  18. <ol>
  19. an opening tag
  20. True
  21. href
  22. line 1
  23. 2
  24. dog.jpg
  25. 50
  26. <ol>
  27. My Hobbies
  28. <
  29. quiz.html
  30. <body>
  31. An old fort
  32. 2
  33. an attribute
  34. an opening tag
  35. False
  36. <li>
  37. to describe the image
  38. numbers
  39. True
  40. in the same tab

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