← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 548 · 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 of these is a closing tag? (a) </title> (b) <body> (c) <p> (d) <title>
  2. 2.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow</p>
  5. 5.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <p>Rain today</p>
  6. 6.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  7. 7.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  8. 8.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) Take the quiz (b) contact.html (c) School news (d) href
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <p>Rain today
    line 2: <i>I love mangoes.</i>
    line 3: <em>Fun facts</em>
    (a) line 3 (b) line 2 (c) line 1
  10. 10.💬 Does the browser show comments on the page? (a) No (b) Yes
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  12. 12.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  13. 13.🔍 One closing tag is missing. Which one?
    <h2>My best friend
    <small>Our school trip</small>
    <i>My pets</i>
    (a) </b> (b) </h2> (c) </i> (d) </small>
  14. 14.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    (a) Fun facts (b) Cricket is fun. (c) Rain today
  15. 15.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) Take the quiz (b) School news (c) art.html (d) href
  16. 16.Which of these is an opening tag? (a) </h1> (b) </b> (c) </li> (d) <p>
  17. 17.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  18. 18.Which of these is a closing tag? (a) </h1> (b) <li> (c) <p> (d) <h1>
  19. 19.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
  21. 21.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) Contact us (b) About us (c) maths.html (d) href
  22. 22.🔗 Where does this link open?
    <a href="news.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  23. 23.Which of these is an opening tag? (a) </h1> (b) </body> (c) </title> (d) <h1>
  24. 24.Which of these is a closing tag? (a) <title> (b) </li> (c) <li> (d) <body>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  26. 26.True or false: in <img>, height describes the picture. (a) False (b) True
  27. 27.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png
  28. 28.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) </h3> (d) <h3>
  29. 29.True or false: <img> has a closing tag. (a) True (b) False
  30. 30.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  31. 31.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
  32. 32.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  33. 33.True or false: a code editor saves our .html files. (a) True (b) False
  34. 34.True or false: in <img>, width sets how wide it is. (a) True (b) False
  35. 35.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  36. 36.True or false: a code editor is where we type code. (a) False (b) True
  37. 37.Which of these goes in the head? (a) <img> (b) <style> (c) <p> (d) <h1>
  38. 38.Which of these is true of a web server? (a) shows line numbers (b) saves our .html files (c) opens web pages for us (d) sends pages over the net
  39. 39.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) <body> (d) <!DOCTYPE html>
  40. 40.📄 Can HTML on its own count button clicks? (a) Yes (b) No

Answer key

  1. </title>
  2. opens it in a new tab
  3. <h4>
  4. 3
  5. 2
  6. element
  7. 3
  8. School news
  9. line 1
  10. No
  11. 3
  12. 3
  13. </h2>
  14. Rain today
  15. School news
  16. <p>
  17. <h1>
  18. </h1>
  19. <a>
  20. 2
  21. About us
  22. in a new tab
  23. <h1>
  24. </li>
  25. 2
  26. False
  27. tiger.jpg
  28. </h3>
  29. False
  30. <h6>
  31. <h1>
  32. False
  33. True
  34. True
  35. <ul>
  36. True
  37. <style>
  38. sends pages over the net
  39. </html>
  40. No

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