← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 421 · 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 address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) https://example.com (c) contact.html (d) about.html
  2. 2.True or false: <p> is an empty tag. (a) True (b) False
  3. 3.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  4. 4.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) About us (c) href (d) Play games
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <i>I love mangoes.
    line 3: <em>My best friend</em>
    (a) line 1 (b) line 3 (c) line 2
  6. 6.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
  7. 7.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  8. 8.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  9. 9.True or false: HTML on its own can make a form. (a) False (b) True
  10. 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  12. 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  13. 13.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  14. 14.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  15. 15.True or false: in <img>, height names the picture file. (a) True (b) False
  16. 16.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  17. 17.True or false: a web browser colours code to help us. (a) True (b) False
  18. 18.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
  19. 19.True or false: <ol> lists steps in order. (a) False (b) True
  20. 20.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <p>Fun facts</p>
    <h3>Cricket is fun.</h3>
    (a) </p> (b) </u> (c) </h1> (d) </h3>
  21. 21.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  22. 22.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
  23. 23.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  24. 24.True or false: HTML on its own can run a game loop. (a) True (b) False
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) My pets (b) Hello, world! (c) Cricket is fun.
  26. 26.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
  28. 28.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  29. 29.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) games.html (c) about.html (d) contact.html
  30. 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Birds sing</p>
  32. 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  33. 33.True or false: a web server turns HTML into a page. (a) True (b) False
  34. 34.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  35. 35.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  36. 36.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  38. 38.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  40. 40.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>

Answer key

  1. about.html
  2. False
  3. to leave notes
  4. Play games
  5. line 2
  6. 2
  7. a slash /
  8. 2
  9. True
  10. Yes
  11. 5
  12. <li>
  13. <a>
  14. has a closing tag
  15. False
  16. a web server
  17. False
  18. <img>
  19. True
  20. </h1>
  21. <ul>
  22. -->
  23. 2
  24. False
  25. Cricket is fun.
  26. in the body
  27. 1
  28. opens it in a new tab
  29. games.html
  30. <h1>
  31. 3
  32. No
  33. False
  34. No
  35. <!DOCTYPE html>
  36. 4
  37. 1
  38. a closing tag
  39. <h1>
  40. <h1>

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