← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 152 · 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 text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Hello, world! (c) Cricket is fun.
  2. 2.True or false: <img> has a closing tag. (a) False (b) True
  3. 3.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Mars is red. (d) Art Gallery
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <b>Rain today
    line 2: <u>My pets</u>
    line 3: <h2>I love mangoes.</h2>
    (a) line 3 (b) line 2 (c) line 1
  5. 5.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) colours code to help us (d) opens web pages for us
  6. 6.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  7. 7.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Rain today (c) My pets (d) Our school trip
  8. 8.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    (a) Fun facts (b) Good morning! (c) My pets
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) index.html (c) Planets (d) Class 7 Blog
  10. 10.True or false: <p> goes in the head. (a) False (b) True
  11. 11.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  12. 12.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) opens web pages for us (d) hosts websites online
  13. 13.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  14. 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  15. 15.Which of these is a closing tag? (a) </body> (b) <title> (c) <body> (d) <p>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  17. 17.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) My best friend (b) My pets (c) I love mangoes. (d) Rain today
  18. 18.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
  20. 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  21. 21.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
  23. 23.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Fun facts</h4>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <h4>Our school trip</h4>
  24. 24.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  25. 25.📋 What number does the browser show next to “Mango”?
    <ol start="2">
      <li>Papaya</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  26. 26.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  28. 28.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
  29. 29.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in the same tab (b) in a new tab
  30. 30.Which of these is a closing tag? (a) </li> (b) <body> (c) <h1> (d) <li>
  31. 31.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
  32. 32.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) quiz.html (b) School news (c) news.html (d) games.html
  33. 33.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  34. 34.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  36. 36.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>I love mangoes.</h4>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
  38. 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
  39. 39.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  40. 40.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. The red kite
  2. False
  3. Art Gallery
  4. line 1
  5. opens web pages for us
  6. 2
  7. Our school trip
  8. Fun facts
  9. Class 7 Blog
  10. False
  11. True
  12. opens web pages for us
  13. 2
  14. opens it in a new tab
  15. </body>
  16. The full moon
  17. My best friend
  18. in the head
  19. <h6>
  20. on the browser tab
  21. a closing tag
  22. 1
  23. 3
  24. 2
  25. 3
  26. has a closing tag
  27. 3
  28. <h1>
  29. in the same tab
  30. </li>
  31. height
  32. news.html
  33. No
  34. <img>
  35. <h1>
  36. 2
  37. 1
  38. as one space
  39. 4
  40. in the same tab

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