← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 916 · 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 tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  2. 2.True or false: HTML on its own can add up two numbers. (a) False (b) True
  3. 3.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) answers page requests (d) sends pages over the net
  4. 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  6. 6.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  8. 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) pixels (d) tags
  9. 9.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  10. 10.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  11. 11.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  12. 12.🔗 Where does this link open?
    <a href="contact.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  13. 13.🔍 Which is the odd one out? (a) has an address bar (b) hosts websites online (c) opens web pages for us (d) shows pages from the web
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  15. 15.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a paintbrush (d) a printer
  16. 16.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  17. 17.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.
    <strong>Hello, world!</strong>
    <h1>Cricket is fun.</h1>
    (a) </em> (b) </h1> (c) </u> (d) </strong>
  18. 18.🔗 Where does this link open?
    <a href="news.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) My pets (c) Good morning!
  20. 20.True or false: <img> goes in the body. (a) True (b) False
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) height (d) width
  22. 22.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) The red kite (b) My best friend (c) Rain today
  23. 23.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My best friend (b) Fun facts (c) I love mangoes.
  24. 24.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  25. 25.🔍 One closing tag is missing. Which one?
    <small>My best friend</small>
    <p>Hello, world!
    <u>My pets</u>
    (a) </p> (b) </h1> (c) </u> (d) </small>
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) bus.jpg (b) An old fort (c) width (d) Our school bus
  27. 27.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  28. 28.Which of these is a closing tag? (a) <li> (b) </li> (c) <body> (d) <b>
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Cricket is fun.</h3>
    <h3>The red kite</h3>
    <h2>My best friend</h2>
    <h2>Rain today</h2>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
  31. 31.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  32. 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  33. 33.True or false: a web server colours code to help us. (a) False (b) True
  34. 34.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  35. 35.🔗 Where does this link open?
    <a href="about.html">Play games</a>
    (a) in the same tab (b) in a new tab
  36. 36.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  37. 37.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </html> (c) </body> (d) <!DOCTYPE html>
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  39. 39.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>

Answer key

  1. <img>
  2. False
  3. shows pages from the web
  4. No
  5. 300
  6. a closing tag
  7. 2
  8. tags
  9. <!--
  10. -->
  11. <h1>
  12. in a new tab
  13. hosts websites online
  14. 350
  15. a plain text editor
  16. in the same tab
  17. </u>
  18. in a new tab
  19. My pets
  20. True
  21. alt
  22. My best friend
  23. I love mangoes.
  24. <ul>
  25. </p>
  26. Our school bus
  27. True
  28. </li>
  29. 5
  30. 1
  31. href
  32. <a>
  33. False
  34. a code editor
  35. in the same tab
  36. True
  37. <!DOCTYPE html>
  38. bullets
  39. in the body
  40. </head>

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