← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 340 · 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 is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My Hobbies (b) Welcome! (c) body (d) Mars is red.
  2. 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  3. 3.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) I love mangoes. (b) Our school trip (c) Fun facts
  4. 4.Which of these is a closing tag? (a) <h1> (b) <body> (c) <title> (d) </body>
  5. 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  7. 7.True or false: in <img>, src is read by screen readers. (a) False (b) True
  8. 8.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  9. 9.True or false: <ul> lists things in any order. (a) True (b) False
  10. 10.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  11. 11.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) https://example.com (c) about.html (d) contact.html
  12. 12.Which of these is true of a web server? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) answers page requests
  13. 13.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
  14. 14.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  15. 15.True or false: in <img>, width names the picture file. (a) True (b) False
  16. 16.Which of these goes in the head? (a) <p> (b) <table> (c) <link rel="stylesheet"> (d) <a>
  17. 17.True or false: <p> is an empty tag. (a) True (b) False
  18. 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  19. 19.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  20. 20.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
  21. 21.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  22. 22.Which of these has a closing tag? (a) <hr> (b) <b> (c) <img> (d) <input>
  23. 23.True or false: a code editor opens web pages for us. (a) False (b) True
  24. 24.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
  25. 25.True or false: <input> has a closing tag. (a) True (b) False
  26. 26.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    (a) I love mangoes. (b) Hello, world! (c) My pets (d) Our school trip
  27. 27.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Cricket is fun. (c) Our school trip (d) Rain today
  28. 28.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) has an address bar (d) colours code to help us
  29. 29.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
  30. 30.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  31. 31.True or false: <style> goes in the head. (a) False (b) True
  32. 32.True or false: in <img>, width sets how wide it is. (a) False (b) True
  33. 33.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
  34. 34.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <h1> (d) <p>
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  36. 36.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  38. 38.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  39. 39.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  40. 40.True or false: <meta> has a closing tag. (a) True (b) False

Answer key

  1. Welcome!
  2. href
  3. Our school trip
  4. </body>
  5. in the head
  6. 1
  7. False
  8. to leave notes
  9. True
  10. <li>
  11. about.html
  12. answers page requests
  13. <h1>
  14. 8
  15. False
  16. <link rel="stylesheet">
  17. False
  18. a slash /
  19. <ul>
  20. </h3>
  21. as one space
  22. <b>
  23. False
  24. 2
  25. False
  26. My pets
  27. Cricket is fun.
  28. has an address bar
  29. a paragraph
  30. a code editor
  31. True
  32. True
  33. starts a new line
  34. <meta charset="utf-8">
  35. 6
  36. a web browser
  37. 1
  38. <ul>
  39. 3
  40. False

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