← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 79 · 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 shows line numbers? (a) a code editor (b) a web server (c) a web browser
  2. 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  3. 3.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  4. 4.True or false: <table> goes in the body. (a) True (b) False
  5. 5.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) answers page requests (d) turns HTML into a page
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  7. 7.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) games.html (b) href (c) Maths fun (d) Art corner
  8. 8.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  10. 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing</p>
  12. 12.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h2> (c) <h6> (d) <h5>
  13. 13.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
  14. 14.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  15. 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Stars shine<br>Birds sing<br>Kites fly high</p>
  17. 17.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>My pets</p>
    <p>Fun facts</p>
  18. 18.🔠 Are headings shown in bold by default? (a) Yes (b) No
  19. 19.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  20. 20.🔍 One closing tag is missing. Which one?
    <b>Fun facts
    <h1>Rain today</h1>
    <p>The red kite</p>
    (a) </h1> (b) </b> (c) </small> (d) </p>
  21. 21.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.</em>
    line 2: <i>Fun facts</i>
    line 3: <h2>The red kite
    (a) line 2 (b) line 1 (c) line 3
  23. 23.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
  25. 25.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
  27. 27.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  28. 28.True or false: HTML on its own can pick a random number. (a) True (b) False
  29. 29.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  30. 30.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) art.html (b) news.html (c) About us (d) quiz.html
  31. 31.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  32. 32.Which of these has a closing tag? (a) <input> (b) <li> (c) <br> (d) <img>
  33. 33.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) answers page requests (d) hosts websites online
  34. 34.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  35. 35.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  36. 36.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
  37. 37.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  39. 39.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) </html> (b) <html>
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>

Answer key

  1. a code editor
  2. <img>
  3. a web browser
  4. True
  5. answers page requests
  6. 2
  7. Maths fun
  8. 3
  9. 5
  10. <h4>
  11. 5
  12. <h2>
  13. <h6>
  14. to leave notes
  15. an opening tag
  16. 5
  17. 6
  18. Yes
  19. href
  20. </b>
  21. True
  22. line 3
  23. No
  24. a slash /
  25. 2
  26. 1
  27. 3
  28. False
  29. a web server
  30. art.html
  31. <h4>
  32. <li>
  33. shows pages from the web
  34. 2
  35. <!DOCTYPE html>
  36. starts a new line
  37. in the body
  38. element
  39. <html>
  40. <h1>

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