← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 248 · 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 headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <h3>Rain today</h3>
  2. 2.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  3. 3.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) is where we type code (d) turns HTML into a page
  4. 4.True or false: a code editor is where we type code. (a) True (b) False
  5. 5.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    (a) Good morning! (b) Hello, world! (c) Our school trip
  6. 6.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  7. 7.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) href (c) Maths fun (d) Visit the site
  8. 8.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  9. 9.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  10. 10.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Good morning!</h4>
    <h2>The red kite</h2>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
  12. 12.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
  13. 13.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  15. 15.Which of these has a closing tag? (a) <hr> (b) <p> (c) <br> (d) <img>
  16. 16.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) </head>
  17. 17.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  18. 18.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
  19. 19.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
  20. 20.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
  21. 21.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  22. 22.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Hello, world!</h2>
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>My best friend</p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  25. 25.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue</p>
  27. 27.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) is where we type code
  28. 28.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    (a) My best friend (b) Fun facts (c) I love mangoes.
  29. 29.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <em>My pets</em>
    line 2: <p>Our school trip</p>
    line 3: <h3>I love mangoes.
    (a) line 3 (b) line 1 (c) line 2
  32. 32.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  33. 33.True or false: HTML on its own can make tables. (a) False (b) True
  34. 34.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h4>The red kite</h4>
  35. 35.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) turns HTML into a page (d) sends pages over the net
  36. 36.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
  38. 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  39. 39.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png

Answer key

  1. 2
  2. <li>
  3. turns HTML into a page
  4. True
  5. Hello, world!
  6. 4
  7. Visit the site
  8. <a href="about.html">
  9. <img>
  10. 3
  11. 2
  12. 2
  13. a web browser
  14. bullets
  15. <p>
  16. <!DOCTYPE html>
  17. <h6>
  18. <!DOCTYPE html>
  19. starts a new line
  20. alt
  21. 3
  22. 4
  23. <h1>
  24. numbers
  25. numbers
  26. 2
  27. is where we type code
  28. I love mangoes.
  29. a closing tag
  30. href
  31. line 3
  32. <a>
  33. True
  34. 2
  35. turns HTML into a page
  36. a closing tag
  37. alt
  38. a slash /
  39. <ul>
  40. map.png

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