← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 737 · 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.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Our school trip</p>
    <h4>I love mangoes.</h4>
  2. 2.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
  3. 3.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Stars shine<br>Rivers flow</p>
  7. 7.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
  10. 10.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) art.html (c) Play games (d) maths.html
  11. 11.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  12. 12.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.
    <h2>Rain today</h2>
    <strong>Hello, world!</strong>
    (a) </h2> (b) </h3> (c) </h1> (d) </strong>
  13. 13.True or false: <ul> goes in the head. (a) True (b) False
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) Good morning! (b) I love mangoes. (c) Fun facts
  16. 16.🔍 One closing tag is missing. Which one?
    <em>Rain today</em>
    <h3>Hello, world!</h3>
    <i>Fun facts
    (a) </em> (b) </h3> (c) </b> (d) </i>
  17. 17.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.</u>
    <p>My best friend</p>
    <em>Rain today
    (a) </em> (b) </u> (c) </p> (d) </h2>
  18. 18.Which of these is a closing tag? (a) <body> (b) </p> (c) <h1> (d) <li>
  19. 19.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  20. 20.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  21. 21.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
  22. 22.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) Contact us (b) About us (c) about.html (d) href
  24. 24.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) href (b) About us (c) https://example.com (d) Contact us
  26. 26.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) opens web pages for us (d) has an address bar
  27. 27.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
  28. 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
  29. 29.True or false: <li> has a closing tag. (a) True (b) False
  30. 30.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Class 7 Blog (c) My drawings (d) index.html
  32. 32.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  33. 33.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  34. 34.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  35. 35.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <i>Hello, world!
    line 2: <b>Fun facts</b>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 3 (b) line 1 (c) line 2
  37. 37.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  38. 38.True or false: HTML on its own can make tables. (a) False (b) True
  39. 39.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>

Answer key

  1. 2
  2. 2
  3. in the head
  4. a web server
  5. 150
  6. 4
  7. 2
  8. element
  9. <h6>
  10. maths.html
  11. opens it in a new tab
  12. </h1>
  13. False
  14. 6
  15. I love mangoes.
  16. </i>
  17. </em>
  18. </p>
  19. 4
  20. True
  21. <
  22. in the body
  23. About us
  24. on the browser tab
  25. About us
  26. colours code to help us
  27. the body
  28. height
  29. True
  30. 1
  31. Class 7 Blog
  32. href
  33. <a>
  34. <ol>
  35. <h5>
  36. line 1
  37. alt
  38. True
  39. False
  40. <h2>

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