← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 36 · 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.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
  3. 3.True or false: a web server hosts websites online. (a) False (b) True
  4. 4.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) saves our .html files (d) sends pages over the net
  5. 5.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) shows pages from the web (d) has an address bar
  6. 6.True or false: HTML on its own can make a form. (a) False (b) True
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Birthday cake (b) width (c) map.png (d) Map of India
  8. 8.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  9. 9.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Contact us (c) Visit the site (d) href
  10. 10.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) art.html
  11. 11.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) href (c) games.html (d) Contact us
  12. 12.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  13. 13.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  14. 14.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  15. 15.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) href (b) About us (c) quiz.html (d) Contact us
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
  17. 17.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
  19. 19.🔢 In a basic web page file, which comes first: “<head>” or “</head>”? (a) <head> (b) </head>
  20. 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  22. 22.💬 Does the browser show comments on the page? (a) No (b) Yes
  23. 23.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    (a) The red kite (b) Fun facts (c) Rain today (d) I love mangoes.
  24. 24.Which of these is a closing tag? (a) <body> (b) </body> (c) <title> (d) <b>
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  26. 26.True or false: HTML on its own can add up two numbers. (a) False (b) True
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) width (b) Our school bus (c) bus.jpg (d) An old fort
  28. 28.Which of these is a closing tag? (a) <body> (b) <title> (c) </b> (d) <li>
  29. 29.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
  30. 30.True or false: HTML on its own can make headings. (a) False (b) True
  31. 31.True or false: <ul> lists things in any order. (a) True (b) False
  32. 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  33. 33.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My pets</h2>
    <h2>Fun facts</h2>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  34. 34.Which of these is an opening tag? (a) <b> (b) </p> (c) </b> (d) </title>
  35. 35.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
  36. 36.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <li> (d) <b>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
  38. 38.Which of these has a closing tag? (a) <input> (b) <br> (c) <h1> (d) <meta>
  39. 39.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  40. 40.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text

Answer key

  1. structure
  2. alt
  3. True
  4. has an address bar
  5. hosts websites online
  6. True
  7. Map of India
  8. a web browser
  9. Contact us
  10. Take the quiz
  11. Contact us
  12. to leave notes
  13. -->
  14. <a>
  15. About us
  16. <h2>
  17. 4
  18. src
  19. <head>
  20. <h5>
  21. 400
  22. No
  23. Rain today
  24. </body>
  25. Yes
  26. False
  27. Our school bus
  28. </b>
  29. 6
  30. True
  31. True
  32. No
  33. 3
  34. <b>
  35. to describe the image
  36. <meta>
  37. 1
  38. <h1>
  39. opens it in a new tab
  40. text with links

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