← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 590 · 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 does this code make?
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <p>Cricket is fun.</p>
  2. 2.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <h4>Good morning!</h4>
  3. 3.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  4. 4.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My best friend</h4>
    <h2>Our school trip</h2>
    <h3>Rain today</h3>
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h3> (b) <h1> (c) <h5> (d) <h6>
  6. 6.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  7. 7.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.True or false: a web server shows line numbers. (a) False (b) True
  9. 9.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) games.html (b) Maths fun (c) quiz.html (d) about.html
  10. 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  11. 11.Which of these is a closing tag? (a) <b> (b) <p> (c) </body> (d) <li>
  12. 12.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  13. 13.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  14. 14.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <table> (c) <p> (d) <h1>
  15. 15.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  16. 16.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  17. 17.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    (a) The red kite (b) My pets (c) I love mangoes. (d) My best friend
  18. 18.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  20. 20.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <html> (b) <body>
  21. 21.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  22. 22.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today</u>
    line 2: <em>The red kite
    line 3: <h2>My best friend</h2>
    (a) line 1 (b) line 3 (c) line 2
  25. 25.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  26. 26.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  27. 27.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <p>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) map.png (c) A red kite (d) cake.jpg
  29. 29.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <\h1> (d) <h1/>
  30. 30.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  31. 31.🔍 Which is the odd one out? (a) stores a website’s files (b) turns HTML into a page (c) opens web pages for us (d) has an address bar
  32. 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <em>The red kite
    line 2: <h3>My pets</h3>
    line 3: <p>Cricket is fun.</p>
    (a) line 3 (b) line 1 (c) line 2
  34. 34.True or false: a web browser shows pages from the web. (a) True (b) False
  35. 35.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  36. 36.True or false: HTML on its own can make a form. (a) False (b) True
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
  38. 38.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) opens web pages for us
  39. 39.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  40. 40.🔍 One closing tag is missing. Which one?
    <u>Rain today
    <h1>I love mangoes.</h1>
    <h3>My best friend</h3>
    (a) </h2> (b) </h1> (c) </h3> (d) </u>

Answer key

  1. 2
  2. 2
  3. No
  4. 4
  5. <h6>
  6. in a new tab
  7. an empty tag
  8. False
  9. quiz.html
  10. <li>
  11. </body>
  12. to leave notes
  13. <a href="about.html">
  14. <link rel="stylesheet">
  15. element
  16. 2
  17. My best friend
  18. an empty tag
  19. <h6>
  20. <html>
  21. in a new tab
  22. href
  23. 4
  24. line 2
  25. <a>
  26. True
  27. <p>
  28. kite.png
  29. </h1>
  30. 2
  31. stores a website’s files
  32. Yes
  33. line 1
  34. True
  35. <ul>
  36. True
  37. <h4>
  38. shows line numbers
  39. <!DOCTYPE html>
  40. </u>

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