← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 852 · 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 HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
  2. 2.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  3. 3.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Rain today (c) I love mangoes.
  4. 4.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
  5. 5.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  6. 6.True or false: <ul> is an ordered list. (a) False (b) True
  7. 7.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>My pets</h2>
    <h2>My pets</h2>
  8. 8.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg
  10. 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  11. 11.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  13. 13.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
  14. 14.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Art Gallery (d) Easy snacks
  16. 16.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <input> (d) <b>
  19. 19.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  20. 20.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
  22. 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) The red kite (b) Fun facts (c) I love mangoes.
  24. 24.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  25. 25.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) alt (c) height (d) src
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  27. 27.🔍 One closing tag is missing. Which one?
    <h2>Fun facts
    <em>Rain today</em>
    <h3>The red kite</h3>
    (a) </h3> (b) </em> (c) </small> (d) </h2>
  28. 28.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  29. 29.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
  30. 30.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  31. 31.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) Fun facts (c) My pets (d) I love mangoes.
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
  33. 33.Which of these goes in the body? (a) <title> (b) <h1> (c) <style> (d) <meta charset="utf-8">
  34. 34.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <u>My best friend</u>
    line 3: <b>I love mangoes.
    (a) line 1 (b) line 2 (c) line 3
  36. 36.Which of these is true of a web server? (a) colours code to help us (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  38. 38.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  39. 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>

Answer key

  1. text with links
  2. <h6>
  3. Cricket is fun.
  4. <h6>
  5. No
  6. False
  7. 3
  8. <ol>
  9. A tiger asleep
  10. <!DOCTYPE html>
  11. 2
  12. <h1>
  13. a plain text editor
  14. 2
  15. Art Gallery
  16. a closing tag
  17. a closing tag
  18. <b>
  19. href
  20. in the head
  21. structure
  22. Yes
  23. I love mangoes.
  24. <img>
  25. width
  26. 250
  27. </h2>
  28. 5
  29. <li>
  30. 2
  31. Fun facts
  32. 3
  33. <h1>
  34. in the head
  35. line 3
  36. stores a website’s files
  37. <h6>
  38. a web browser
  39. an opening tag
  40. <h6>

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