← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 227 · 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 many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  2. 2.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <u>My pets</u>
    line 2: <i>I love mangoes.
    line 3: <b>Fun facts</b>
    (a) line 2 (b) line 1 (c) line 3
  4. 4.Which of these is an opening tag? (a) <h1> (b) </p> (c) </b> (d) </h1>
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  6. 6.True or false: a web browser has an address bar. (a) False (b) True
  7. 7.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  8. 8.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) art.html (b) maths.html (c) https://example.com (d) About us
  9. 9.True or false: <ol> lists things in any order. (a) False (b) True
  10. 10.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <small>My best friend
    <h1>I love mangoes.</h1>
    (a) </p> (b) </small> (c) </h1> (d) </h2>
  11. 11.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  12. 12.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  13. 13.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
  14. 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  15. 15.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  17. 17.Which of these is true of a web server? (a) turns HTML into a page (b) colours code to help us (c) stores a website’s files (d) is where we type code
  18. 18.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) All about me (d) Space Facts
  20. 20.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  21. 21.🏷️ Which is the closing tag for <em>? (a) <em> (b) </em> (c) <em/> (d) <\em>
  22. 22.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) href (c) https://example.com (d) Maths fun
  23. 23.True or false: in <img>, height names the picture file. (a) True (b) False
  24. 24.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  25. 25.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  26. 26.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
  27. 27.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  28. 28.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  29. 29.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  30. 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <small>I love mangoes.
    (a) </i> (b) </p> (c) </h2> (d) </small>
  32. 32.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  34. 34.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Good morning!</h4>
    <p>My best friend</p>
  35. 35.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  36. 36.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) sends pages over the net
  37. 37.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
  38. 38.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  39. 39.Which of these goes in the head? (a) <h1> (b) <p> (c) <title> (d) <ul>
  40. 40.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <h2>The red kite</h2>

Answer key

  1. 2
  2. a web browser
  3. line 2
  4. <h1>
  5. numbers
  6. True
  7. 6
  8. https://example.com
  9. False
  10. </small>
  11. a code editor
  12. <
  13. <h1>
  14. as one space
  15. in the body
  16. the body
  17. stores a website’s files
  18. an empty tag
  19. Space Facts
  20. in the head
  21. </em>
  22. Visit the site
  23. False
  24. False
  25. <!--
  26. a slash /
  27. <h1>
  28. <ol>
  29. on the browser tab
  30. a closing tag
  31. </small>
  32. <h1>
  33. 2
  34. 2
  35. <h1>
  36. shows pages from the web
  37. 2
  38. starts a new line
  39. <title>
  40. 5

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