← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 135 · 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.True or false: in <img>, height shows if the image fails. (a) True (b) False
  2. 2.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    (a) Fun facts (b) Hello, world! (c) Rain today (d) My best friend
  3. 3.True or false: <input> has a closing tag. (a) True (b) False
  4. 4.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  5. 5.True or false: in <img>, src tells which image to load. (a) False (b) True
  6. 6.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h5>? (a) <h6> (b) <h4> (c) <h2> (d) <h5>
  7. 7.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  8. 8.📄 Can HTML on its own make a form? (a) No (b) Yes
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="100">
  10. 10.Which of these is true of a web server? (a) sends pages over the net (b) opens web pages for us (c) shows pages from the web (d) colours code to help us
  11. 11.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
  12. 12.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  13. 13.True or false: a web browser saves our .html files. (a) True (b) False
  14. 14.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) maths.html (b) Art corner (c) href (d) Maths fun
  15. 15.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Rain today</p>
    <h3>Rain today</h3>
  16. 16.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) <body> (d) <!DOCTYPE html>
  17. 17.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) High Tech (d) Hot Tags
  18. 18.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My pets</p>
    <h4>My best friend</h4>
  19. 19.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Art Gallery (c) Here is my best one. (d) Planets
  22. 22.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  23. 23.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  25. 25.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) alt (d) height
  26. 26.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) cake.jpg (b) moon.png (c) dog.jpg (d) Birthday cake
  29. 29.True or false: <img> has a closing tag. (a) False (b) True
  30. 30.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Good morning!</h4>
    <h4>I love mangoes.</h4>
  31. 31.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) colours code to help us (d) has an address bar
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Cricket Club (d) My drawings
  35. 35.True or false: in <img>, height sets how tall it is. (a) True (b) False
  36. 36.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  37. 37.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  38. 38.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
  39. 39.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>

Answer key

  1. False
  2. Rain today
  3. False
  4. href
  5. True
  6. <h6>
  7. <h1>
  8. Yes
  9. 100
  10. sends pages over the net
  11. a line across the page
  12. Yes
  13. False
  14. Maths fun
  15. 2
  16. <!DOCTYPE html>
  17. HyperText
  18. 2
  19. an opening tag
  20. True
  21. Art Gallery
  22. 6
  23. in the head
  24. on the browser tab
  25. alt
  26. to describe the image
  27. 2
  28. cake.jpg
  29. False
  30. 3
  31. in the head
  32. colours code to help us
  33. <h6>
  34. Cricket Club
  35. True
  36. <ul>
  37. <!DOCTYPE html>
  38. 3
  39. alt
  40. <h2>

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