← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 511 · 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 shows line numbers? (a) a web server (b) a code editor (c) a web browser
  2. 2.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) games.html (b) about.html (c) quiz.html (d) Take the quiz
  3. 3.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  4. 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
  5. 5.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  7. 7.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) Rain today (b) Good morning! (c) My pets
  9. 9.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) My best friend (d) My pets
  10. 10.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
  11. 11.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  12. 12.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) a closing tag (d) an element name
  13. 13.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Contact us (d) Visit the site
  14. 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  15. 15.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
  16. 16.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.True or false: <ul> lists things in any order. (a) False (b) True
  19. 19.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) School news (b) href (c) Take the quiz (d) news.html
  20. 20.True or false: <br> is an empty tag. (a) False (b) True
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
  22. 22.🔍 One closing tag is missing. Which one?
    <i>My best friend
    <h3>Rain today</h3>
    <h1>Good morning!</h1>
    (a) </h3> (b) </i> (c) </h1> (d) </em>
  23. 23.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h6>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
  25. 25.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
  26. 26.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) saves our .html files (d) opens web pages for us
  27. 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  28. 28.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  29. 29.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  30. 30.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Cricket Club (c) Planets (d) body
  31. 31.True or false: a web browser has an address bar. (a) False (b) True
  32. 32.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  35. 35.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
  39. 39.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  40. 40.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. a code editor
  2. quiz.html
  3. alt
  4. Yes
  5. a closing tag
  6. to leave notes
  7. 2
  8. Good morning!
  9. I love mangoes.
  10. 2
  11. 4
  12. an attribute
  13. Contact us
  14. True
  15. width
  16. 2
  17. a closing tag
  18. True
  19. School news
  20. True
  21. 1
  22. </i>
  23. in a new tab
  24. <h6>
  25. Markup
  26. opens web pages for us
  27. No
  28. </small>
  29. bullets
  30. Planets
  31. True
  32. 1
  33. <h1>
  34. Yes
  35. <img>
  36. 3
  37. <h1>
  38. <h1>
  39. <h2>
  40. an empty tag

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