← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 828 · 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 show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
  2. 2.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  3. 3.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png
  5. 5.💬 Does the browser show comments on the page? (a) No (b) Yes
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) A happy dog (b) width (c) dog.jpg (d) The full moon
  7. 7.📄 Can HTML on its own make a form? (a) No (b) Yes
  8. 8.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  9. 9.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  10. 10.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  11. 11.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <h2>Rain today</h2>
    <p>Good morning!</p>
  12. 12.🔗 Which address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) Maths fun (b) quiz.html (c) news.html (d) art.html
  13. 13.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Hello, world!</h4>
    <h3>Cricket is fun.</h3>
    <p>Rain today</p>
  14. 14.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  15. 15.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  16. 16.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  17. 17.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
  18. 18.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
  19. 19.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) maths.html (b) art.html (c) Art corner (d) https://example.com
  20. 20.True or false: <ul> goes in the head. (a) True (b) False
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.
    line 2: <strong>My best friend</strong>
    line 3: <p>I love mangoes.</p>
    (a) line 3 (b) line 1 (c) line 2
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <h3>Rain today</h3>
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  24. 24.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
  25. 25.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) Hot Tags (d) High Tech
  26. 26.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>My pets</p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) quiz.html (c) Maths fun (d) games.html
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <i>Our school trip</i>
    line 3: <h1>I love mangoes.
    (a) line 2 (b) line 3 (c) line 1
  29. 29.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    (a) My best friend (b) My pets (c) Good morning! (d) Hello, world!
  30. 30.🔗 Where does this link open?
    <a href="art.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) width (b) Our school bus (c) The full moon (d) moon.png
  32. 32.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) contact.html (b) about.html (c) https://example.com (d) Take the quiz
  33. 33.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) has an address bar (d) stores a website’s files
  34. 34.True or false: in <img>, height sets how tall it is. (a) True (b) False
  35. 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  36. 36.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  37. 37.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  39. 39.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
  40. 40.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph

Answer key

  1. 3
  2. <h6>
  3. in the head
  4. tiger.jpg
  5. No
  6. A happy dog
  7. Yes
  8. <h5>
  9. in a new tab
  10. on the browser tab
  11. 3
  12. art.html
  13. 3
  14. <h6>
  15. the body
  16. <!--
  17. height
  18. 6
  19. https://example.com
  20. False
  21. line 1
  22. 3
  23. <h1>
  24. a line across the page
  25. HyperText
  26. 3
  27. news.html
  28. line 3
  29. Hello, world!
  30. in the same tab
  31. The full moon
  32. about.html
  33. has an address bar
  34. True
  35. opens it in a new tab
  36. <h1>
  37. </b>
  38. 1
  39. 2
  40. a paragraph

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