← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 173 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Welcome! (b) index.html (c) Space Facts (d) Here is my best one.
  2. 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  3. 3.True or false: a code editor sends pages over the net. (a) True (b) False
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  5. 5.True or false: a web browser has an address bar. (a) False (b) True
  6. 6.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  7. 7.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  8. 8.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <h2>Rain today</h2>
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
  10. 10.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  11. 11.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) contact.html (b) https://example.com (c) about.html (d) Contact us
  12. 12.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  13. 13.🔍 One closing tag is missing. Which one?
    <h2>Our school trip</h2>
    <b>Good morning!
    <h1>My best friend</h1>
    (a) </h1> (b) </h2> (c) </b> (d) </i>
  14. 14.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  15. 15.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
  16. 16.True or false: <ol> shows bullet points. (a) False (b) True
  17. 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  18. 18.True or false: <li> is an ordered list. (a) True (b) False
  19. 19.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <br>
  20. 20.True or false: <h1> is an empty tag. (a) False (b) True
  21. 21.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  23. 23.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  25. 25.True or false: HTML on its own can make headings. (a) False (b) True
  26. 26.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
  27. 27.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) shows line numbers (d) hosts websites online
  30. 30.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
  31. 31.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <em>Hello, world!
    <h2>Cricket is fun.</h2>
    (a) </small> (b) </h2> (c) </em> (d) </b>
  32. 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing<br>Roses are red</p>
  34. 34.🔍 One closing tag is missing. Which one?
    <h1>Fun facts
    <h3>The red kite</h3>
    <small>Good morning!</small>
    (a) </h1> (b) </h3> (c) </b> (d) </small>
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) tiger.jpg (b) width (c) A tiger asleep (d) A red kite
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Birds sing</p>
  37. 37.True or false: HTML on its own cannot make headings. (a) True (b) False
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  39. 39.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  40. 40.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. Space Facts
  2. <h1>
  3. False
  4. bullets
  5. True
  6. <h1>
  7. a code editor
  8. 2
  9. 4
  10. element
  11. about.html
  12. in the same tab
  13. </b>
  14. No
  15. text with links
  16. False
  17. <ul>
  18. False
  19. <br>
  20. False
  21. <img>
  22. 1
  23. 3
  24. 50
  25. True
  26. width
  27. a closing tag
  28. an opening tag
  29. shows line numbers
  30. <a>
  31. </em>
  32. No
  33. 4
  34. </h1>
  35. A tiger asleep
  36. 3
  37. False
  38. 2
  39. numbers
  40. has a closing tag

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