← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 918 · 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 list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  2. 2.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
  3. 3.Which of these goes in the head? (a) <ul> (b) <title> (c) <table> (d) <a>
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
  5. 5.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  6. 6.True or false: HTML on its own can make bullet lists. (a) False (b) True
  7. 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  8. 8.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!
    <strong>Good morning!</strong>
    <i>My pets</i>
    (a) </strong> (b) </b> (c) </i> (d) </h2>
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) Cricket is fun. (d) Good morning!
  10. 10.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets</h3>
    line 2: <h1>Fun facts</h1>
    line 3: <b>Rain today
    (a) line 2 (b) line 3 (c) line 1
  12. 12.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.True or false: <ol> is an ordered list. (a) True (b) False
  14. 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
  15. 15.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  16. 16.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
  17. 17.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h5>? (a) <h2> (b) <h3> (c) <h5> (d) <h4>
  19. 19.True or false: in <img>, alt tells which image to load. (a) True (b) False
  20. 20.Which of these goes in the head? (a) <img> (b) <h1> (c) <link rel="stylesheet"> (d) <a>
  21. 21.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>My best friend</p>
    <h4>The red kite</h4>
    <p>Fun facts</p>
  22. 22.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) Maths fun (c) href (d) Visit the site
  23. 23.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
  24. 24.True or false: HTML on its own can keep a high score. (a) False (b) True
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  26. 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  27. 27.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>Hello, world!</p>
  29. 29.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) art.html (b) Take the quiz (c) news.html (d) maths.html
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <u>Good morning!</u>
    line 2: <h2>Cricket is fun.</h2>
    line 3: <small>The red kite
    (a) line 3 (b) line 2 (c) line 1
  31. 31.💬 Does the browser show comments on the page? (a) Yes (b) No
  32. 32.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
  33. 33.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  34. 34.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u> (c) <\u> (d) <u/>
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  36. 36.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
  37. 37.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  38. 38.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) href (b) School news (c) Art corner (d) games.html
  39. 39.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  40. 40.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>

Answer key

  1. <ul>
  2. 1
  3. <title>
  4. 1
  5. <!DOCTYPE html>
  6. True
  7. <li>
  8. </h2>
  9. Good morning!
  10. a closing tag
  11. line 3
  12. in the body
  13. True
  14. element
  15. No
  16. <h2>
  17. in the body
  18. <h5>
  19. False
  20. <link rel="stylesheet">
  21. 2
  22. Visit the site
  23. alt
  24. False
  25. Yes
  26. <a href="about.html">
  27. in the body
  28. 2
  29. maths.html
  30. line 3
  31. No
  32. <h6>
  33. to leave notes
  34. </u>
  35. <h1>
  36. 1
  37. False
  38. Art corner
  39. a paragraph
  40. 2

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