← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 795 · 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 picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg
  2. 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
  3. 3.Which of these is a closing tag? (a) <p> (b) </title> (c) <b> (d) <h1>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) Birthday cake (c) map.png (d) width
  6. 6.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  7. 7.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  9. 9.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
  12. 12.💬 Does the browser show comments on the page? (a) No (b) Yes
  13. 13.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <style>
  14. 14.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  16. 16.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) saves our .html files
  17. 17.🔗 Where does this link open?
    <a href="games.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  18. 18.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) width (d) height
  19. 19.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  20. 20.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  21. 21.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  22. 22.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) contact.html (c) href (d) About us
  23. 23.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  25. 25.True or false: <li> lists steps in order. (a) True (b) False
  26. 26.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    (a) My best friend (b) Hello, world! (c) Rain today
  28. 28.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
  29. 29.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
  30. 30.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="150">
    (a) The full moon (b) moon.png (c) width (d) Our school bus
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  33. 33.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  34. 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) All about me (d) We won by 5 runs.
  37. 37.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  38. 38.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  40. 40.📄 Can HTML on its own make tables? (a) No (b) Yes

Answer key

  1. dog.jpg
  2. src
  3. </title>
  4. An old fort
  5. Map of India
  6. to leave notes
  7. 7
  8. A tiger asleep
  9. a line across the page
  10. 4
  11. a slash /
  12. No
  13. <table>
  14. on the browser tab
  15. 300
  16. stores a website’s files
  17. in a new tab
  18. alt
  19. <h1>
  20. <h5>
  21. <ol>
  22. About us
  23. in the head
  24. opens it in a new tab
  25. False
  26. <img>
  27. Rain today
  28. src
  29. <
  30. <h2>
  31. The full moon
  32. A tiger asleep
  33. True
  34. <h1>
  35. 4
  36. Class 7 Blog
  37. a code editor
  38. Markup
  39. 250
  40. Yes

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