← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 929 · 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.True or false: <ol> is an ordered list. (a) False (b) True
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  4. 4.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  5. 5.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  6. 6.Which of these has a closing tag? (a) <img> (b) <hr> (c) <title> (d) <br>
  7. 7.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  8. 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  9. 9.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) colours code to help us (d) is where we type code
  10. 10.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  11. 11.True or false: a web browser turns HTML into a page. (a) False (b) True
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Fun facts</h3>
    <h3>Cricket is fun.</h3>
  13. 13.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <h2>The red kite</h2>
    <p>Rain today
    (a) </em> (b) </h1> (c) </p> (d) </h2>
  14. 14.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  15. 15.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  16. 16.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My pets</h2>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
  17. 17.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Cricket is fun.</h4>
    <h2>My pets</h2>
  18. 18.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  19. 19.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  21. 21.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  22. 22.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) <h3/> (d) </h3>
  23. 23.True or false: <li> goes inside ul or ol. (a) False (b) True
  24. 24.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
  25. 25.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  26. 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) index.html (d) Art Gallery
  29. 29.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  30. 30.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
  31. 31.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  32. 32.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <b>Our school trip
    <h1>Fun facts</h1>
    (a) </h3> (b) </u> (c) </h1> (d) </b>
  33. 33.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  34. 34.True or false: <li> is one item of a list. (a) False (b) True
  35. 35.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) Visit the site (c) href (d) Maths fun
  36. 36.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    (a) The red kite (b) I love mangoes. (c) My pets
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  38. 38.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <!DOCTYPE html> (c) </body> (d) </head>
  39. 39.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) has an address bar
  40. 40.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) I love mangoes. (c) Hello, world!

Answer key

  1. True
  2. bullets
  3. True
  4. on the browser tab
  5. <h2>
  6. <title>
  7. href
  8. Yes
  9. stores a website’s files
  10. <ul>
  11. True
  12. 3
  13. </p>
  14. <img>
  15. element
  16. 4
  17. 3
  18. <ul>
  19. an opening tag
  20. in the same tab
  21. in the same tab
  22. </h3>
  23. True
  24. opens it in a new tab
  25. an empty tag
  26. Yes
  27. 300
  28. Art Gallery
  29. <a>
  30. <h5>
  31. a web server
  32. </b>
  33. <h1>
  34. True
  35. Visit the site
  36. The red kite
  37. 50
  38. </html>
  39. has an address bar
  40. Hello, world!

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