← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 583 · 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 does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  2. 2.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    (a) I love mangoes. (b) The red kite (c) Rain today (d) Our school trip
  3. 3.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
  4. 4.Which of these goes in the head? (a) <ul> (b) <h1> (c) <p> (d) <meta charset="utf-8">
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  6. 6.Which of these is a closing tag? (a) <b> (b) </title> (c) <p> (d) <h1>
  7. 7.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  8. 8.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Our school trip</h2>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  9. 9.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
  10. 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <h2>Cricket is fun.</h2>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  13. 13.🔗 What does HyperText mean? (a) secret text (b) text in colour (c) text with links (d) very big text
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Rain today (c) Good morning!
  15. 15.🔗 Where does this link open?
    <a href="about.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  16. 16.True or false: <ol> goes inside ul or ol. (a) True (b) False
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  18. 18.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing</p>
  20. 20.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <h3>I love mangoes.</h3>
  21. 21.📋 What number does the browser show next to “Papaya”?
    <ol start="6">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  22. 22.True or false: <input> is an empty tag. (a) False (b) True
  23. 23.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg
  25. 25.Which of these is true of a code editor? (a) has an address bar (b) hosts websites online (c) saves our .html files (d) turns HTML into a page
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  27. 27.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  28. 28.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  29. 29.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  30. 30.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  31. 31.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
  32. 32.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  33. 33.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) about.html
  34. 34.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) colours code to help us (d) hosts websites online
  35. 35.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  36. 36.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Good morning!</p>
    <p>Rain today</p>
  37. 37.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  39. 39.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Hello, world! (c) My pets (d) I love mangoes.
  40. 40.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets

Answer key

  1. -->
  2. Our school trip
  3. <h1>
  4. <meta charset="utf-8">
  5. A happy dog
  6. </title>
  7. 1
  8. 2
  9. a slash /
  10. <ul>
  11. numbers
  12. 4
  13. text with links
  14. Rain today
  15. in a new tab
  16. False
  17. element
  18. </html>
  19. 2
  20. 2
  21. 8
  22. True
  23. to describe the image
  24. An old fort
  25. saves our .html files
  26. alt
  27. True
  28. opens it in a new tab
  29. False
  30. the body
  31. to leave notes
  32. <a>
  33. Maths fun
  34. turns HTML into a page
  35. a web server
  36. 1
  37. in the head
  38. No
  39. I love mangoes.
  40. bullets

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