← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 668 · 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 one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <p>The red kite
    line 3: <small>Cricket is fun.</small>
    (a) line 1 (b) line 3 (c) line 2
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Stars shine<br>Rivers flow</p>
  4. 4.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>
  5. 5.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
  6. 6.True or false: <h1> is an empty tag. (a) False (b) True
  7. 7.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
  9. 9.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  10. 10.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) games.html (b) Play games (c) href (d) About us
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  12. 12.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  13. 13.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    (a) Good morning! (b) Rain today (c) The red kite (d) Our school trip
  15. 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) Art corner (c) href (d) School news
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) All about me (b) I like to read. (c) Cricket Club (d) index.html
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p>
  20. 20.True or false: in <img>, src is read by screen readers. (a) False (b) True
  21. 21.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  22. 22.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
  23. 23.True or false: HTML on its own can show paragraphs. (a) True (b) False
  24. 24.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h1>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  25. 25.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) art.html (d) maths.html
  26. 26.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Kites fly high<br>Birds sing</p>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg
  29. 29.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
  30. 30.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
  31. 31.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
  32. 32.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.</b>
    line 2: <h3>Good morning!</h3>
    line 3: <em>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  34. 34.🌐 Which one stores a website’s files? (a) a code editor (b) a web server (c) a web browser
  35. 35.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) opens web pages for us (d) stores a website’s files
  36. 36.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>My pets</p>
  38. 38.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  39. 39.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
  40. 40.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Rain today</p>

Answer key

  1. a web server
  2. line 2
  3. 4
  4. <a>
  5. 2
  6. False
  7. has a closing tag
  8. <h6>
  9. to leave notes
  10. Play games
  11. a slash /
  12. as one space
  13. an opening tag
  14. Our school trip
  15. <h6>
  16. Art corner
  17. element
  18. Cricket Club
  19. 5
  20. False
  21. a web browser
  22. <h1>
  23. True
  24. <h1>
  25. maths.html
  26. <ol>
  27. 4
  28. A tiger asleep
  29. the body
  30. a line across the page
  31. <h6>
  32. an opening tag
  33. line 3
  34. a web server
  35. opens web pages for us
  36. href
  37. 3
  38. Yes
  39. 2
  40. 4

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