← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 847 · 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 line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <h3>My best friend
    line 3: <p>Rain today</p>
    (a) line 2 (b) line 3 (c) line 1
  2. 2.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  3. 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  4. 4.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  5. 5.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  6. 6.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) shows pages from the web (d) saves our .html files
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) width (c) bus.jpg (d) Our school bus
  8. 8.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Rain today (b) My best friend (c) Cricket is fun. (d) Our school trip
  10. 10.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) Map of India (b) width (c) A red kite (d) kite.png
  12. 12.Which of these is true of a web browser? (a) answers page requests (b) shows line numbers (c) has an address bar (d) is where we type code
  13. 13.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  14. 14.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
  15. 15.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  16. 16.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <p>Cricket is fun.
    line 3: <h1>Hello, world!</h1>
    (a) line 3 (b) line 2 (c) line 1
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  19. 19.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
  20. 20.True or false: a web browser turns HTML into a page. (a) False (b) True
  21. 21.Which of these is a closing tag? (a) <title> (b) <b> (c) <li> (d) </p>
  22. 22.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  23. 23.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  24. 24.Which of these is true of a web server? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) sends pages over the net
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  26. 26.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
  27. 27.Which of these is true of a web server? (a) stores a website’s files (b) colours code to help us (c) is where we type code (d) turns HTML into a page
  28. 28.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
  29. 29.Which of these has a closing tag? (a) <title> (b) <br> (c) <img> (d) <meta>
  30. 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
  31. 31.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My drawings (b) body (c) Riya’s Recipes (d) Try this poha.
  32. 32.True or false: <ul> shows bullet points. (a) False (b) True
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red<br>Birds sing</p>
  34. 34.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  36. 36.🔗 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
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) Our school bus (b) moon.png (c) width (d) The full moon
  38. 38.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  39. 39.Which of these is an opening tag? (a) </body> (b) </b> (c) <h1> (d) </p>
  40. 40.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) href (c) Art corner (d) https://example.com

Answer key

  1. line 2
  2. <a>
  3. <ol>
  4. -->
  5. <img>
  6. shows pages from the web
  7. Our school bus
  8. has a closing tag
  9. Our school trip
  10. on the browser tab
  11. A red kite
  12. has an address bar
  13. Yes
  14. .html
  15. in a new tab
  16. a paragraph
  17. line 2
  18. 50
  19. alt
  20. True
  21. </p>
  22. <ul>
  23. opens it in a new tab
  24. sends pages over the net
  25. bullets
  26. the body
  27. stores a website’s files
  28. <h1>
  29. <title>
  30. <h1>
  31. My drawings
  32. True
  33. 5
  34. 4
  35. 400
  36. Take the quiz
  37. The full moon
  38. Yes
  39. <h1>
  40. Art corner

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