← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 718 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="250">
    (a) Our school bus (b) width (c) The full moon (d) moon.png
  2. 2.True or false: <p> goes in the body. (a) True (b) False
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine</p>
  4. 4.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  5. 5.True or false: <b> has a closing tag. (a) True (b) False
  6. 6.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  7. 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  9. 9.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  12. 12.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
  13. 13.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <b>Rain today</b>
    line 3: <i>My best friend</i>
    (a) line 2 (b) line 1 (c) line 3
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Welcome! (d) Art Gallery
  16. 16.🔠 Are headings shown in bold by default? (a) Yes (b) No
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  18. 18.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  19. 19.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  20. 20.Which of these is an empty tag? (a) <p> (b) <h1> (c) <hr> (d) <ul>
  21. 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h6>
  22. 22.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h5>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow</p>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Sky is blue<br>Kites fly high<br>Stars shine</p>
  26. 26.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  27. 27.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
  28. 28.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My pets (c) Fun facts (d) Rain today
  30. 30.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) href (c) Visit the site (d) quiz.html
  31. 31.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  32. 32.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) adds a picture (d) makes a list
  33. 33.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  34. 34.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) Play games (c) contact.html (d) https://example.com
  35. 35.True or false: a code editor has an address bar. (a) False (b) True
  36. 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  37. 37.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>My best friend</p>
  38. 38.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
  40. 40.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. The full moon
  2. True
  3. 3
  4. a web browser
  5. True
  6. to describe the image
  7. an opening tag
  8. 3
  9. has a closing tag
  10. No
  11. 150
  12. .html
  13. <
  14. line 1
  15. Art Gallery
  16. Yes
  17. 2
  18. <!--
  19. href
  20. <hr>
  21. <h1>
  22. <h1>
  23. 2
  24. 2
  25. 5
  26. <h1>
  27. colours code to help us
  28. 6
  29. Fun facts
  30. Contact us
  31. in a new tab
  32. starts a new line
  33. <a>
  34. contact.html
  35. False
  36. a web browser
  37. 4
  38. an opening tag
  39. 1
  40. in the same tab

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