← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 431 · 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 address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) Maths fun (b) about.html (c) games.html (d) contact.html
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
  3. 3.🔍 One closing tag is missing. Which one?
    <small>Hello, world!
    <strong>I love mangoes.</strong>
    <h2>Cricket is fun.</h2>
    (a) </h2> (b) </em> (c) </small> (d) </strong>
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    (a) My pets (b) The red kite (c) My best friend
  5. 5.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <small>Rain today</small>
    <h1>Our school trip
    (a) </small> (b) </h1> (c) </h2> (d) </em>
  6. 6.Which of these has a closing tag? (a) <hr> (b) <h1> (c) <br> (d) <img>
  7. 7.Which of these is true of a web server? (a) opens web pages for us (b) shows pages from the web (c) is where we type code (d) stores a website’s files
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <b>Our school trip
    line 2: <i>Hello, world!</i>
    line 3: <u>My best friend</u>
    (a) line 3 (b) line 1 (c) line 2
  9. 9.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.🔗 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
  11. 11.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
  12. 12.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
  13. 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  15. 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </body> (d) </html>
  16. 16.True or false: <p> has a closing tag. (a) False (b) True
  17. 17.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  18. 18.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  19. 19.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) news.html (b) href (c) Contact us (d) Visit the site
  20. 20.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
  22. 22.Which of these goes in the head? (a) <h1> (b) <ul> (c) <meta charset="utf-8"> (d) <p>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
  24. 24.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
  26. 26.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  27. 27.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My best friend</p>
    <h4>Hello, world!</h4>
    <p>My pets</p>
    <p>Fun facts</p>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="300">
  29. 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Riya’s Recipes (d) My drawings
  31. 31.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
  32. 32.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  33. 33.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) has an address bar (d) colours code to help us
  34. 34.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Rain today</p>
    <p>My pets</p>
    <h3>Our school trip</h3>
    <p>My best friend</p>
  36. 36.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) Our school trip (b) My pets (c) Good morning! (d) Fun facts
  37. 37.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  38. 38.🔍 Which is the odd one out? (a) colours code to help us (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
  40. 40.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>

Answer key

  1. games.html
  2. 1
  3. </small>
  4. My pets
  5. </h1>
  6. <h1>
  7. stores a website’s files
  8. line 1
  9. has a closing tag
  10. opens it in a new tab
  11. <h6>
  12. 4
  13. in the body
  14. to leave notes
  15. </html>
  16. True
  17. False
  18. <h6>
  19. Contact us
  20. <h1>
  21. 1
  22. <meta charset="utf-8">
  23. 1
  24. -->
  25. 1
  26. False
  27. 2
  28. 300
  29. No
  30. Riya’s Recipes
  31. href
  32. Yes
  33. has an address bar
  34. Language
  35. 2
  36. Our school trip
  37. a web server
  38. colours code to help us
  39. 250
  40. <h4>

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