← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 593 · 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 number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  2. 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Match report (b) body (c) Try this poha. (d) Cricket Club
  4. 4.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  5. 5.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  6. 6.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) contact.html (c) games.html (d) about.html
  7. 7.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  8. 8.Which of these goes in the head? (a) <img> (b) <p> (c) <h1> (d) <title>
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  10. 10.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  11. 11.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Good morning!
  12. 12.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  13. 13.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  15. 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow</p>
  17. 17.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  18. 18.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  19. 19.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <b>Rain today</b>
    <i>The red kite</i>
    (a) </b> (b) </i> (c) </h1> (d) </small>
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  21. 21.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  22. 22.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) opens web pages for us (d) saves our .html files
  23. 23.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  24. 24.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    (a) Good morning! (b) I love mangoes. (c) Rain today
  26. 26.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) saves our .html files
  28. 28.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) shows line numbers
  29. 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  30. 30.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  31. 31.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  32. 32.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  33. 33.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  34. 34.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <h4>Rain today</h4>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  35. 35.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!</strong>
    <p>I love mangoes.
    <h1>Our school trip</h1>
    (a) </h3> (b) </p> (c) </h1> (d) </strong>
  36. 36.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <p>I love mangoes.</p>
    line 2: <small>My pets</small>
    line 3: <h1>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  38. 38.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
  39. 39.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) href (d) https://example.com
  40. 40.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
    <h2>Fun facts</h2>
    <p>Our school trip</p>

Answer key

  1. 3
  2. No
  3. Match report
  4. Yes
  5. 3
  6. games.html
  7. <a>
  8. <title>
  9. <h1>
  10. a web browser
  11. My pets
  12. to leave notes
  13. an empty tag
  14. a web browser
  15. in the head
  16. 3
  17. <h6>
  18. alt
  19. </h1>
  20. 200
  21. <h5>
  22. opens web pages for us
  23. <img>
  24. 5
  25. Rain today
  26. in the head
  27. has an address bar
  28. shows line numbers
  29. <h6>
  30. to describe the image
  31. 6
  32. No
  33. 1
  34. 2
  35. </p>
  36. a web browser
  37. line 3
  38. height
  39. Take the quiz
  40. 3

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