← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 565 · 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 is the odd one out? (a) shows pages from the web (b) answers page requests (c) opens web pages for us (d) turns HTML into a page
  2. 2.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
  3. 3.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
  4. 4.True or false: <br> has a closing tag. (a) True (b) False
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) I love mangoes. (b) Our school trip (c) Fun facts
  6. 6.Which of these is an opening tag? (a) <li> (b) </h1> (c) </title> (d) </body>
  7. 7.True or false: HTML on its own can count button clicks. (a) False (b) True
  8. 8.Which of these is true of a code editor? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) shows pages from the web
  9. 9.🔍 One closing tag is missing. Which one?
    <h2>Our school trip
    <em>I love mangoes.</em>
    <u>Hello, world!</u>
    (a) </em> (b) </p> (c) </h2> (d) </u>
  10. 10.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
  11. 11.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  12. 12.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
  13. 13.True or false: in <img>, src shows if the image fails. (a) False (b) True
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <p>My best friend</p>
    line 2: <small>I love mangoes.</small>
    line 3: <h2>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  15. 15.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <p>Hello, world!</p>
    <p>My pets</p>
    <h2>My pets</h2>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg
  17. 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  18. 18.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <h4>Rain today</h4>
    <h4>Rain today</h4>
  19. 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  20. 20.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>My best friend</p>
    <h2>Good morning!</h2>
  21. 21.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) Visit the site (c) contact.html (d) https://example.com
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  23. 23.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  24. 24.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) saves our .html files
  25. 25.True or false: <ol> is an unordered list. (a) False (b) True
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red</p>
  27. 27.🔍 One closing tag is missing. Which one?
    <u>My best friend</u>
    <strong>Fun facts</strong>
    <h2>My pets
    (a) </u> (b) </small> (c) </strong> (d) </h2>
  28. 28.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>My pets</h3>
    <h3>My pets</h3>
  29. 29.Which of these is true of a web server? (a) saves our .html files (b) colours code to help us (c) stores a website’s files (d) opens web pages for us
  30. 30.🔍 One closing tag is missing. Which one?
    <em>Cricket is fun.
    <p>My best friend</p>
    <small>Good morning!</small>
    (a) </h1> (b) </p> (c) </small> (d) </em>
  31. 31.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  32. 32.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <ul>
  33. 33.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in a new tab (b) in the same tab
  34. 34.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) https://example.com (c) Play games (d) contact.html
  36. 36.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  38. 38.Which of these is an opening tag? (a) <h1> (b) </body> (c) </h1> (d) </p>
  39. 39.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) news.html (b) Art corner (c) art.html (d) maths.html
  40. 40.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. answers page requests
  2. 3
  3. 6
  4. False
  5. I love mangoes.
  6. <li>
  7. False
  8. is where we type code
  9. </h2>
  10. Language
  11. No
  12. element
  13. False
  14. line 3
  15. 4
  16. Birthday cake
  17. <img>
  18. 3
  19. Yes
  20. 5
  21. about.html
  22. A tiger asleep
  23. <a>
  24. saves our .html files
  25. False
  26. 2
  27. </h2>
  28. 3
  29. stores a website’s files
  30. </em>
  31. True
  32. <ul>
  33. in the same tab
  34. starts a new line
  35. contact.html
  36. an opening tag
  37. False
  38. <h1>
  39. maths.html
  40. in the head

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