← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 773 · 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.True or false: <ol> is an ordered list. (a) True (b) False
  2. 2.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
  3. 3.Which of these is an opening tag? (a) <body> (b) </p> (c) </title> (d) </b>
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.</h2>
    line 2: <u>The red kite
    line 3: <em>Our school trip</em>
    (a) line 1 (b) line 3 (c) line 2
  5. 5.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Try this poha. (d) Planets
  7. 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) has an address bar (d) opens web pages for us
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  9. 9.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
  10. 10.Which of these has a closing tag? (a) <br> (b) <input> (c) <p> (d) <hr>
  11. 11.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  12. 12.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  13. 13.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  14. 14.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  15. 15.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
  16. 16.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  17. 17.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
  18. 18.Which of these is an empty tag? (a) <p> (b) <ul> (c) <hr> (d) <title>
  19. 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
  20. 20.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  21. 21.True or false: <ol> goes inside ul or ol. (a) True (b) False
  22. 22.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  24. 24.Which of these goes in the head? (a) <p> (b) <h1> (c) <title> (d) <ul>
  25. 25.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  26. 26.Which of these is true of a web server? (a) is where we type code (b) sends pages over the net (c) shows line numbers (d) colours code to help us
  27. 27.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <h1>I love mangoes.
    <h2>Good morning!</h2>
    (a) </small> (b) </h1> (c) </strong> (d) </h2>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) href (c) https://example.com (d) Art corner
  30. 30.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  31. 31.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) A red kite (c) map.png (d) cake.jpg
  32. 32.True or false: HTML on its own can run a game loop. (a) True (b) False
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
  34. 34.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>The red kite</p>
  36. 36.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <p>Fun facts</p>
  37. 37.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  38. 38.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <p>Fun facts</p>
  39. 39.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.</h3>
    <b>My pets</b>
    <h2>The red kite
    (a) </strong> (b) </h3> (c) </b> (d) </h2>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort

Answer key

  1. True
  2. a line across the page
  3. <body>
  4. line 2
  5. in a new tab
  6. Planets
  7. is where we type code
  8. element
  9. 6
  10. <p>
  11. to leave notes
  12. 3
  13. in a new tab
  14. Yes
  15. 1
  16. 3
  17. alt
  18. <hr>
  19. as one space
  20. <ol>
  21. False
  22. in the body
  23. Yes
  24. <title>
  25. on the browser tab
  26. sends pages over the net
  27. </h1>
  28. 1
  29. Maths fun
  30. opens it in a new tab
  31. kite.png
  32. False
  33. <h1>
  34. <img>
  35. 3
  36. 2
  37. <h1>
  38. 2
  39. </h2>
  40. fort.jpg

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