← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 574 · 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 words do you click on?
    <a href="art.html">About us</a>
    (a) art.html (b) Contact us (c) href (d) About us
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  3. 3.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  5. 5.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    (a) Cricket is fun. (b) Fun facts (c) Hello, world! (d) My pets
  6. 6.True or false: a code editor opens web pages for us. (a) False (b) True
  7. 7.True or false: HTML on its own can count button clicks. (a) False (b) True
  8. 8.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  9. 9.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  10. 10.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
  11. 11.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <u>Cricket is fun.
    <b>Our school trip</b>
    (a) </small> (b) </h2> (c) </b> (d) </u>
  12. 12.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  13. 13.True or false: HTML on its own can make tables. (a) False (b) True
  14. 14.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <h1> (d) <p>
  15. 15.True or false: in <img>, src names the picture file. (a) False (b) True
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <small>My pets</small>
    line 2: <strong>I love mangoes.
    line 3: <h3>The red kite</h3>
    (a) line 3 (b) line 2 (c) line 1
  17. 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  18. 18.True or false: a web browser turns HTML into a page. (a) False (b) True
  19. 19.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
  20. 20.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Fun facts (b) The red kite (c) My best friend (d) My pets
  21. 21.📄 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>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) My drawings (c) index.html (d) Class 7 Blog
  22. 22.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  23. 23.True or false: <ol> is one item of a list. (a) False (b) True
  24. 24.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  25. 25.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
  28. 28.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    (a) My best friend (b) The red kite (c) My pets
  29. 29.True or false: <title> is an empty tag. (a) False (b) True
  30. 30.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  31. 31.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Good morning! (c) My pets (d) Cricket is fun.
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) Birthday cake (b) width (c) A happy dog (d) cake.jpg
  34. 34.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
  35. 35.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) stores a website’s files (d) answers page requests
  36. 36.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p/> (c) <p> (d) <\p>
  37. 37.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) href (b) Visit the site (c) Maths fun (d) maths.html
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  40. 40.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    (a) Fun facts (b) Our school trip (c) My best friend

Answer key

  1. About us
  2. <h5>
  3. in the head
  4. 3
  5. Hello, world!
  6. False
  7. False
  8. 3
  9. <li>
  10. on the browser tab
  11. </u>
  12. </h1>
  13. True
  14. <meta charset="utf-8">
  15. True
  16. line 2
  17. <h1>
  18. True
  19. opens it in a new tab
  20. My best friend
  21. Class 7 Blog
  22. a code editor
  23. False
  24. 4
  25. in a new tab
  26. 2
  27. 2
  28. The red kite
  29. False
  30. <!DOCTYPE html>
  31. an opening tag
  32. Good morning!
  33. Birthday cake
  34. to leave notes
  35. is where we type code
  36. </p>
  37. Visit the site
  38. 4
  39. bullets
  40. Fun facts

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