← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 19 · 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.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  2. 2.Which of these has a closing tag? (a) <ul> (b) <meta> (c) <br> (d) <hr>
  3. 3.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h6>
  4. 4.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  5. 5.True or false: <li> has a closing tag. (a) True (b) False
  6. 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  7. 7.True or false: HTML on its own can make bullet lists. (a) False (b) True
  8. 8.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) games.html (c) About us (d) Contact us
  10. 10.True or false: <meta> has a closing tag. (a) True (b) False
  11. 11.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) shows line numbers (d) has an address bar
  12. 12.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  13. 13.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  14. 14.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
  15. 15.True or false: HTML on its own can count button clicks. (a) False (b) True
  16. 16.Which of these is an opening tag? (a) </p> (b) </li> (c) </title> (d) <p>
  17. 17.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  18. 18.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
  20. 20.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  21. 21.Which of these is a closing tag? (a) <h1> (b) <p> (c) </h1> (d) <body>
  22. 22.True or false: <ul> shows bullet points. (a) True (b) False
  23. 23.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  24. 24.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  25. 25.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) alt (d) width
  26. 26.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) About us (b) href (c) quiz.html (d) Play games
  27. 27.🔍 Which is the odd one out? (a) saves our .html files (b) sends pages over the net (c) shows line numbers (d) is where we type code
  28. 28.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) quiz.html (c) art.html (d) news.html
  29. 29.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <strong>Cricket is fun.
    <h2>I love mangoes.</h2>
    (a) </u> (b) </h2> (c) </strong> (d) </h1>
  30. 30.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  31. 31.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Class 7 Blog (c) Thanks for visiting. (d) Match report
  33. 33.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
  34. 34.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.True or false: <li> lists things in any order. (a) False (b) True
  36. 36.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) https://example.com (c) href (d) About us
  37. 37.True or false: a web browser shows pages from the web. (a) False (b) True
  38. 38.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  39. 39.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) about.html
  40. 40.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>

Answer key

  1. Yes
  2. <ul>
  3. <h6>
  4. <a href="about.html">
  5. True
  6. No
  7. True
  8. an empty tag
  9. About us
  10. False
  11. shows line numbers
  12. to leave notes
  13. <
  14. src
  15. False
  16. <p>
  17. <h1>
  18. in the head
  19. a web browser
  20. on the browser tab
  21. </h1>
  22. True
  23. 1
  24. <ul>
  25. width
  26. Play games
  27. sends pages over the net
  28. art.html
  29. </strong>
  30. <!--
  31. <h2>
  32. Match report
  33. a line across the page
  34. a closing tag
  35. False
  36. About us
  37. True
  38. Yes
  39. Contact us
  40. <h6>

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