← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 480 · 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 attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  2. 2.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    (a) My pets (b) Rain today (c) Fun facts
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    (a) Good morning! (b) My pets (c) My best friend
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today</h3>
    line 2: <p>Hello, world!
    line 3: <h2>I love mangoes.</h2>
    (a) line 1 (b) line 2 (c) line 3
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  6. 6.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
  8. 8.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
  9. 9.📄 Can HTML on its own make headings? (a) No (b) Yes
  10. 10.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
  11. 11.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  14. 14.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  15. 15.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>My best friend</p>
    <p>My best friend</p>
  16. 16.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  17. 17.🔗 Where does this link open?
    <a href="https://example.com">Contact us</a>
    (a) in a new tab (b) in the same tab
  18. 18.🔗 Where does this link open?
    <a href="art.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing</p>
  20. 20.True or false: a web server sends pages over the net. (a) False (b) True
  21. 21.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
  22. 22.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    (a) The red kite (b) Cricket is fun. (c) Hello, world!
  23. 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
  24. 24.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    (a) My pets (b) Our school trip (c) I love mangoes. (d) Hello, world!
  25. 25.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) quiz.html (b) news.html (c) games.html (d) Take the quiz
  26. 26.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
  27. 27.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
  28. 28.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
  30. 30.True or false: a web server colours code to help us. (a) False (b) True
  31. 31.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  32. 32.🌍 Which program shows a web page to us? (a) a music player (b) a calculator (c) a paint program (d) a web browser
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
  34. 34.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  35. 35.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  36. 36.Which of these is an opening tag? (a) <title> (b) </title> (c) </p> (d) </h1>
  37. 37.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
  38. 38.💬 Does the browser show comments on the page? (a) No (b) Yes
  39. 39.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  40. 40.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>

Answer key

  1. src
  2. Rain today
  3. Good morning!
  4. line 2
  5. bullets
  6. <h4>
  7. 1
  8. a paragraph
  9. Yes
  10. HyperText
  11. in a new tab
  12. in the head
  13. <h1>
  14. has a closing tag
  15. 3
  16. <h1>
  17. in the same tab
  18. in a new tab
  19. 4
  20. True
  21. <h1>
  22. Cricket is fun.
  23. height
  24. Our school trip
  25. news.html
  26. Language
  27. </h1>
  28. <h1>
  29. 2
  30. False
  31. a closing tag
  32. a web browser
  33. <h2>
  34. 3
  35. <!DOCTYPE html>
  36. <title>
  37. <h2>
  38. No
  39. 6
  40. <h5>

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