← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 741 · 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 paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Cricket is fun. (c) The red kite
  3. 3.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
  4. 4.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) maths.html (c) art.html (d) Visit the site
  5. 5.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  6. 6.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
  8. 8.Which of these is true of a web browser? (a) has an address bar (b) answers page requests (c) stores a website’s files (d) saves our .html files
  9. 9.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  10. 10.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My best friend</p>
    <p>My pets</p>
  11. 11.Which of these has a closing tag? (a) <input> (b) <ul> (c) <br> (d) <img>
  12. 12.Which of these has a closing tag? (a) <hr> (b) <input> (c) <meta> (d) <p>
  13. 13.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Art Gallery (b) body (c) Match report (d) We won by 5 runs.
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.
    line 2: <h2>The red kite</h2>
    line 3: <em>Good morning!</em>
    (a) line 2 (b) line 3 (c) line 1
  15. 15.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h3>Hello, world!</h3>
  16. 16.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip
    line 2: <p>Fun facts</p>
    line 3: <u>Cricket is fun.</u>
    (a) line 2 (b) line 1 (c) line 3
  18. 18.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) School news (b) Art corner (c) art.html (d) href
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!</h1>
    line 2: <p>Rain today</p>
    line 3: <b>Hello, world!
    (a) line 1 (b) line 2 (c) line 3
  21. 21.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="300">
    (a) bus.jpg (b) The full moon (c) moon.png (d) fort.jpg
  22. 22.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) width (c) Map of India (d) Birthday cake
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Stars shine</p>
  26. 26.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Rain today</h3>
    <p>Rain today</p>
  27. 27.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <\i> (d) <i>
  28. 28.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Good morning!</p>
    <h3>Our school trip</h3>
    <h4>I love mangoes.</h4>
    <p>My pets</p>
  29. 29.True or false: HTML on its own cannot make a form. (a) True (b) False
  30. 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
  31. 31.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.True or false: in <img>, width sets how wide it is. (a) False (b) True
  33. 33.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) width (d) src
  34. 34.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  35. 35.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  36. 36.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  38. 38.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  39. 39.True or false: in <img>, height names the picture file. (a) False (b) True
  40. 40.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My pets</p>

Answer key

  1. 1
  2. My pets
  3. 3
  4. https://example.com
  5. opens it in a new tab
  6. <a href="about.html">
  7. 2
  8. has an address bar
  9. <a>
  10. 3
  11. <ul>
  12. <p>
  13. Match report
  14. line 1
  15. 3
  16. True
  17. line 1
  18. Art corner
  19. A red kite
  20. line 3
  21. moon.png
  22. in the head
  23. href
  24. Map of India
  25. 3
  26. 2
  27. </i>
  28. 3
  29. False
  30. Yes
  31. in the head
  32. True
  33. width
  34. on the browser tab
  35. <h1>
  36. a paragraph
  37. 2
  38. <!--
  39. False
  40. 3

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