← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 148 · 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 does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  2. 2.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  4. 4.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
  6. 6.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <h3>I love mangoes.</h3>
  7. 7.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  8. 8.Which of these is an empty tag? (a) <b> (b) <br> (c) <ul> (d) <p>
  9. 9.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  10. 10.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  11. 11.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  12. 12.🏷️ Which is the closing tag for <b>? (a) <b> (b) </b> (c) <\b> (d) <b/>
  13. 13.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  14. 14.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h3>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
  16. 16.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) colours (d) speed
  17. 17.True or false: <br> has a closing tag. (a) True (b) False
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Thanks for visiting. (c) body (d) Welcome!
  19. 19.📋 What number does the browser show next to “Jamun”?
    <ol start="8">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  20. 20.Which of these is a closing tag? (a) </h1> (b) <body> (c) <h1> (d) <title>
  21. 21.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) Play games (c) news.html (d) games.html
  22. 22.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) About us (b) news.html (c) href (d) Play games
  23. 23.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  24. 24.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  25. 25.Which of these is a closing tag? (a) <p> (b) <h1> (c) <title> (d) </li>
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>The red kite</p>
  27. 27.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) href (b) Maths fun (c) games.html (d) Visit the site
  28. 28.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  29. 29.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
  30. 30.True or false: in <img>, height sets how tall it is. (a) False (b) True
  31. 31.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  32. 32.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  33. 33.📄 Can HTML on its own make headings? (a) No (b) Yes
  34. 34.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.True or false: <li> goes inside ul or ol. (a) False (b) True
  36. 36.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
  37. 37.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  38. 38.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  39. 39.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  40. 40.True or false: HTML on its own can make headings. (a) False (b) True

Answer key

  1. a line across the page
  2. has a closing tag
  3. an opening tag
  4. 2
  5. <h2>
  6. 2
  7. -->
  8. <br>
  9. <ol>
  10. <img>
  11. a code editor
  12. </b>
  13. <h1>
  14. <h1>
  15. <h2>
  16. structure
  17. False
  18. Welcome!
  19. 9
  20. </h1>
  21. news.html
  22. Play games
  23. to leave notes
  24. <!DOCTYPE html>
  25. </li>
  26. 4
  27. Visit the site
  28. on the browser tab
  29. src
  30. True
  31. in a new tab
  32. <h1>
  33. Yes
  34. in the head
  35. True
  36. 4
  37. True
  38. opens it in a new tab
  39. <ul>
  40. True

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