← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 755 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Stars shine</p>
  2. 2.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  3. 3.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  4. 4.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
  5. 5.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) is where we type code (d) opens web pages for us
  6. 6.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <h1/> (d) <\h1>
  8. 8.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  9. 9.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  10. 10.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  14. 14.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) turns HTML into a page (d) has an address bar
  15. 15.Which of these is an empty tag? (a) <title> (b) <input> (c) <h1> (d) <li>
  16. 16.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <h2>The red kite</h2>
    <p>Good morning!</p>
    <p>The red kite</p>
  17. 17.🔠 Are headings shown in bold by default? (a) Yes (b) No
  18. 18.Which of these is an empty tag? (a) <img> (b) <p> (c) <li> (d) <h1>
  19. 19.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    (a) Rain today (b) Cricket is fun. (c) The red kite
  20. 20.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  21. 21.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  22. 22.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.True or false: a web browser has an address bar. (a) False (b) True
  24. 24.Which of these has a closing tag? (a) <img> (b) <p> (c) <meta> (d) <input>
  25. 25.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  26. 26.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) Map of India (b) Birthday cake (c) map.png (d) width
  28. 28.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Sky is blue</p>
  30. 30.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  33. 33.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
  34. 34.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
  35. 35.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  36. 36.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  37. 37.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  38. 38.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  39. 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  40. 40.True or false: a code editor sends pages over the net. (a) True (b) False

Answer key

  1. 3
  2. 2
  3. to leave notes
  4. <h6>
  5. opens web pages for us
  6. a closing tag
  7. </h1>
  8. in the same tab
  9. <ol>
  10. <!--
  11. a slash /
  12. 2
  13. 1
  14. is where we type code
  15. <input>
  16. 4
  17. Yes
  18. <img>
  19. Cricket is fun.
  20. False
  21. </b>
  22. a closing tag
  23. True
  24. <p>
  25. False
  26. starts a new line
  27. Map of India
  28. in the head
  29. 3
  30. an opening tag
  31. has a closing tag
  32. an empty tag
  33. structure
  34. <h1>
  35. <a>
  36. True
  37. <ol>
  38. 2
  39. <ul>
  40. False

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