← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 187 · 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 text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Fun facts (c) Good morning!
  2. 2.💬 Does the browser show comments on the page? (a) Yes (b) No
  3. 3.🔍 One closing tag is missing. Which one?
    <h2>Our school trip
    <small>The red kite</small>
    <u>My best friend</u>
    (a) </strong> (b) </h2> (c) </small> (d) </u>
  4. 4.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  5. 5.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) All about me (d) Here is my best one.
  7. 7.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  9. 9.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  10. 10.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) Take the quiz (b) href (c) quiz.html (d) School news
  12. 12.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Hello, world! (b) My best friend (c) I love mangoes.
  13. 13.Which of these is a closing tag? (a) <b> (b) <p> (c) <li> (d) </body>
  14. 14.True or false: a web browser has an address bar. (a) True (b) False
  15. 15.Which of these goes in the head? (a) <p> (b) <ul> (c) <link rel="stylesheet"> (d) <a>
  16. 16.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <br>
  17. 17.Which of these goes in the body? (a) <title> (b) <table> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  18. 18.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>My best friend</h3>
    <h4>Cricket is fun.</h4>
    <h2>Hello, world!</h2>
    <h4>Our school trip</h4>
  19. 19.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  20. 20.True or false: a code editor shows line numbers. (a) True (b) False
  21. 21.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) sends pages over the net
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) Thanks for visiting. (c) index.html (d) Riya’s Recipes
  23. 23.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  24. 24.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  25. 25.📄 Can HTML on its own make tables? (a) Yes (b) No
  26. 26.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <em>Rain today</em>
    <h1>Hello, world!
    (a) </p> (b) </h3> (c) </em> (d) </h1>
  27. 27.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
  28. 28.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    (a) The red kite (b) Cricket is fun. (c) Rain today (d) My pets
  29. 29.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  30. 30.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) <html> (d) <body>
  32. 32.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  33. 33.Which of these is an empty tag? (a) <p> (b) <h1> (c) <img> (d) <ul>
  34. 34.📋 What number does the browser show next to “Papaya”?
    <ol start="2">
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  35. 35.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) Take the quiz (b) href (c) news.html (d) School news
  36. 36.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  38. 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  39. 39.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <head> (c) </head> (d) </html>
  40. 40.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) sends pages over the net (d) turns HTML into a page

Answer key

  1. Hello, world!
  2. No
  3. </h2>
  4. on the browser tab
  5. to describe the image
  6. All about me
  7. Yes
  8. numbers
  9. <a>
  10. width
  11. School news
  12. I love mangoes.
  13. </body>
  14. True
  15. <link rel="stylesheet">
  16. <p>
  17. <table>
  18. 5
  19. False
  20. True
  21. opens web pages for us
  22. Riya’s Recipes
  23. <h6>
  24. a code editor
  25. Yes
  26. </h1>
  27. <!DOCTYPE html>
  28. My pets
  29. in a new tab
  30. Yes
  31. <!DOCTYPE html>
  32. a code editor
  33. <img>
  34. 3
  35. School news
  36. href
  37. 4
  38. <ol>
  39. </html>
  40. sends pages over the net

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