← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 468 · 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 does this code make?
    <p>My pets</p>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
  2. 2.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <h3>The red kite
    line 2: <p>My pets</p>
    line 3: <u>Our school trip</u>
    (a) line 1 (b) line 3 (c) line 2
  5. 5.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  6. 6.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
  7. 7.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h5>
  8. 8.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) https://example.com (c) Visit the site (d) href
  9. 9.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
  10. 10.True or false: a code editor answers page requests. (a) False (b) True
  11. 11.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My pets</p>
    <h2>My best friend</h2>
    <p>Fun facts</p>
  12. 12.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) Visit the site (d) maths.html
  13. 13.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  14. 14.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  15. 15.True or false: <p> has a closing tag. (a) False (b) True
  16. 16.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  17. 17.Which of these is a closing tag? (a) <title> (b) </body> (c) <b> (d) <body>
  18. 18.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  20. 20.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  21. 21.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
  22. 22.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
  23. 23.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  24. 24.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  25. 25.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
  26. 26.Which of these goes in the head? (a) <a> (b) <title> (c) <img> (d) <p>
  27. 27.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  28. 28.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  29. 29.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
  30. 30.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) alt (d) height
  31. 31.True or false: <br> has a closing tag. (a) False (b) True
  32. 32.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  33. 33.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) has an address bar (d) shows pages from the web
  34. 34.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.True or false: HTML on its own can make links to pages. (a) False (b) True
  36. 36.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  37. 37.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) art.html (b) About us (c) news.html (d) maths.html
  38. 38.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a music player (d) a web browser
  39. 39.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
  40. 40.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>My best friend</h2>

Answer key

  1. 2
  2. href
  3. bullets
  4. line 1
  5. <li>
  6. <html>
  7. <h5>
  8. Visit the site
  9. as one space
  10. False
  11. 3
  12. contact.html
  13. False
  14. </h2>
  15. True
  16. <a>
  17. </body>
  18. height
  19. <h4>
  20. <h6>
  21. 4
  22. 2
  23. 3
  24. to leave notes
  25. the body
  26. <title>
  27. 5
  28. <a href="about.html">
  29. -->
  30. alt
  31. False
  32. numbers
  33. colours code to help us
  34. in the body
  35. True
  36. 4
  37. maths.html
  38. a web browser
  39. saves our .html files
  40. 2

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