← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 314 · 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 items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) My drawings (d) Art Gallery
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) art.html
  4. 4.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <i>Good morning!</i>
    line 2: <h3>My pets</h3>
    line 3: <b>I love mangoes.
    (a) line 3 (b) line 1 (c) line 2
  6. 6.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  7. 7.True or false: a code editor answers page requests. (a) False (b) True
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <p>Rain today</p>
    line 2: <h1>Hello, world!
    line 3: <h2>I love mangoes.</h2>
    (a) line 2 (b) line 3 (c) line 1
  9. 9.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="150">
  11. 11.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) Maths fun (d) href
  12. 12.🔠 Are headings shown in bold by default? (a) No (b) Yes
  13. 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  15. 15.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) hosts websites online
  16. 16.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) Art Gallery (d) index.html
  18. 18.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  19. 19.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  20. 20.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
  21. 21.True or false: <ol> shows bullet points. (a) True (b) False
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  23. 23.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  25. 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  26. 26.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) about.html (b) https://example.com (c) Art corner (d) contact.html
  27. 27.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) answers page requests (d) has an address bar
  28. 28.Which of these goes in the head? (a) <p> (b) <ul> (c) <img> (d) <meta charset="utf-8">
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Our school trip
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  32. 32.True or false: in <img>, src names the picture file. (a) True (b) False
  33. 33.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  34. 34.Which of these is an opening tag? (a) </h1> (b) <li> (c) </b> (d) </body>
  35. 35.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  36. 36.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) turns HTML into a page (d) is where we type code
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  38. 38.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>My best friend</p>
    <h2>The red kite</h2>
    <h2>Our school trip</h2>
  39. 39.True or false: in <img>, width sets how wide it is. (a) True (b) False
  40. 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes

Answer key

  1. 3
  2. My drawings
  3. Maths fun
  4. <a>
  5. line 3
  6. href
  7. False
  8. line 2
  9. <h2>
  10. 150
  11. Visit the site
  12. Yes
  13. in the body
  14. <h1>
  15. hosts websites online
  16. True
  17. Art Gallery
  18. <ul>
  19. opens it in a new tab
  20. <!DOCTYPE html>
  21. False
  22. 2
  23. src
  24. 100
  25. <!DOCTYPE html>
  26. about.html
  27. has an address bar
  28. <meta charset="utf-8">
  29. Our school trip
  30. 3
  31. <h5>
  32. True
  33. a slash /
  34. <li>
  35. <ol>
  36. is where we type code
  37. <h2>
  38. 2
  39. True
  40. No

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