← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 252 · 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 part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  2. 2.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  3. 3.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) hosts websites online (d) turns HTML into a page
  4. 4.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  5. 5.True or false: in <img>, src names the picture file. (a) True (b) False
  6. 6.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  7. 7.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  8. 8.Which of these is true of a code editor? (a) shows pages from the web (b) answers page requests (c) opens web pages for us (d) colours code to help us
  9. 9.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) stores a website’s files (d) has an address bar
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.</b>
    line 2: <i>My best friend</i>
    line 3: <h1>Good morning!
    (a) line 2 (b) line 3 (c) line 1
  11. 11.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  12. 12.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) bus.jpg (c) tiger.jpg (d) fort.jpg
  13. 13.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) keys (d) wires
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Roses are red</p>
  15. 15.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a printer (d) a microphone
  16. 16.📄 Can HTML on its own make a form? (a) Yes (b) No
  17. 17.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Rain today (b) Cricket is fun. (c) Good morning! (d) The red kite
  19. 19.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  20. 20.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Our school trip</h4>
    <h2>Good morning!</h2>
    <h4>Our school trip</h4>
    <p>Good morning!</p>
  21. 21.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  22. 22.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
  23. 23.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) Play games (b) about.html (c) contact.html (d) games.html
  24. 24.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) contact.html (b) games.html (c) about.html (d) School news
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  26. 26.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  28. 28.True or false: <input> has a closing tag. (a) True (b) False
  29. 29.True or false: HTML on its own can add up two numbers. (a) False (b) True
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>I love mangoes.</p>
  31. 31.True or false: in <img>, src sets how wide it is. (a) False (b) True
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  33. 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
  34. 34.💬 Does the browser show comments on the page? (a) Yes (b) No
  35. 35.Which of these goes in the head? (a) <img> (b) <a> (c) <h1> (d) <link rel="stylesheet">
  36. 36.Which of these is an opening tag? (a) </b> (b) </title> (c) <body> (d) </h1>
  37. 37.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  38. 38.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) href (c) art.html (d) Visit the site
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) width (b) moon.png (c) The full moon (d) Our school bus
  40. 40.🔗 Where does this link open?
    <a href="about.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. the body
  2. a line across the page
  3. turns HTML into a page
  4. <h6>
  5. True
  6. False
  7. False
  8. colours code to help us
  9. stores a website’s files
  10. line 3
  11. <a>
  12. bus.jpg
  13. tags
  14. 3
  15. a plain text editor
  16. Yes
  17. has a closing tag
  18. The red kite
  19. <a href="about.html">
  20. 4
  21. <li>
  22. <ol>
  23. games.html
  24. games.html
  25. element
  26. cake.jpg
  27. Yes
  28. False
  29. False
  30. 5
  31. False
  32. <h5>
  33. to describe the image
  34. No
  35. <link rel="stylesheet">
  36. <body>
  37. -->
  38. Contact us
  39. The full moon
  40. in a new tab

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