← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 255 · 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>Our school trip</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
  2. 2.True or false: a web browser answers page requests. (a) True (b) False
  3. 3.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) colours code to help us (d) opens web pages for us
  4. 4.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <p> (d) <img>
  5. 5.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
  6. 6.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) map.png (b) A red kite (c) cake.jpg (d) kite.png
  7. 7.Which of these is a closing tag? (a) <p> (b) <title> (c) <body> (d) </p>
  8. 8.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <b>
  9. 9.Which of these is an opening tag? (a) </b> (b) </h1> (c) <body> (d) </p>
  10. 10.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
    <p>Good morning!</p>
    <h3>The red kite</h3>
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) School news (b) href (c) quiz.html (d) Take the quiz
  12. 12.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) games.html (b) href (c) About us (d) Play games
  13. 13.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  14. 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  16. 16.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
  18. 18.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
  19. 19.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  21. 21.True or false: <ol> shows bullet points. (a) True (b) False
  22. 22.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
  23. 23.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) moon.png (c) The full moon (d) Our school bus
  25. 25.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) hosts websites online (d) sends pages over the net
  27. 27.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
  29. 29.True or false: in <img>, alt describes the picture. (a) True (b) False
  30. 30.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  31. 31.True or false: in <img>, height sets how wide it is. (a) True (b) False
  32. 32.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets</h2>
    line 2: <h1>Our school trip
    line 3: <h3>Fun facts</h3>
    (a) line 3 (b) line 1 (c) line 2
  34. 34.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
  35. 35.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  36. 36.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  37. 37.True or false: HTML on its own can keep a high score. (a) True (b) False
  38. 38.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  39. 39.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  40. 40.Which of these is true of a web browser? (a) is where we type code (b) shows pages from the web (c) hosts websites online (d) shows line numbers

Answer key

  1. 3
  2. False
  3. colours code to help us
  4. <p>
  5. dog.jpg
  6. kite.png
  7. </p>
  8. <b>
  9. <body>
  10. 3
  11. School news
  12. Play games
  13. <h1>
  14. <ol>
  15. <h1>
  16. starts a new line
  17. 2
  18. opens it in a new tab
  19. <a href="about.html">
  20. 2
  21. False
  22. as one space
  23. </p>
  24. The full moon
  25. in the body
  26. saves our .html files
  27. an opening tag
  28. the body
  29. True
  30. href
  31. False
  32. <
  33. line 2
  34. a line across the page
  35. No
  36. <h5>
  37. False
  38. <h6>
  39. No
  40. shows pages from the web

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