← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 521 · 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 one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  2. 2.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) All about me (c) Here is my best one. (d) My Hobbies
  3. 3.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
    <p>Rain today</p>
  4. 4.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) Play games (d) href
  5. 5.Which of these is an empty tag? (a) <title> (b) <hr> (c) <p> (d) <b>
  6. 6.Which of these is true of a web server? (a) hosts websites online (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  8. 8.True or false: in <img>, src is read by screen readers. (a) True (b) False
  9. 9.Which of these is an empty tag? (a) <p> (b) <title> (c) <b> (d) <input>
  10. 10.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a paint program (d) a calculator
  11. 11.True or false: a code editor has an address bar. (a) False (b) True
  12. 12.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) Good morning!
  14. 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  15. 15.True or false: in <img>, height describes the picture. (a) True (b) False
  16. 16.Which of these has a closing tag? (a) <br> (b) <hr> (c) <img> (d) <title>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  18. 18.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  19. 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    (a) Good morning! (b) I love mangoes. (c) My best friend
  21. 21.Which of these goes in the body? (a) <title> (b) <style> (c) <h1> (d) <link rel="stylesheet">
  22. 22.🔍 One closing tag is missing. Which one?
    <em>Rain today</em>
    <h1>My pets
    <u>Cricket is fun.</u>
    (a) </h1> (b) </em> (c) </b> (d) </u>
  23. 23.True or false: a web server saves our .html files. (a) True (b) False
  24. 24.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    (a) The red kite (b) Good morning! (c) My pets
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
  26. 26.Which of these is an opening tag? (a) </title> (b) </b> (c) <li> (d) </p>
  27. 27.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  28. 28.💬 Does the browser show comments on the page? (a) Yes (b) No
  29. 29.Which of these is a closing tag? (a) <p> (b) <body> (c) <title> (d) </title>
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Birds sing<br>Sky is blue<br>Kites fly high</p>
  31. 31.True or false: <ol> lists things in any order. (a) True (b) False
  32. 32.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <img>
  33. 33.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
  34. 34.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) answers page requests (d) shows pages from the web
  35. 35.True or false: <ul> has a closing tag. (a) False (b) True
  36. 36.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <small>Rain today
    (a) </small> (b) </p> (c) </h1> (d) </h3>
  37. 37.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  38. 38.🔗 Where does this link open?
    <a href="games.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My Hobbies (b) index.html (c) We won by 5 runs. (d) Welcome!
  40. 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. a web browser
  2. My Hobbies
  3. 5
  4. Take the quiz
  5. <hr>
  6. hosts websites online
  7. 3
  8. False
  9. <input>
  10. a web browser
  11. False
  12. has a closing tag
  13. Good morning!
  14. as one space
  15. False
  16. <title>
  17. bullets
  18. 4
  19. has a closing tag
  20. My best friend
  21. <h1>
  22. </h1>
  23. False
  24. My pets
  25. 1
  26. <li>
  27. numbers
  28. No
  29. </title>
  30. 5
  31. False
  32. <img>
  33. width
  34. shows pages from the web
  35. True
  36. </small>
  37. to leave notes
  38. in the same tab
  39. My Hobbies
  40. an opening tag

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