← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 801 · 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) <body> (b) <p> (c) <title> (d) </b>
  2. 2.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
  3. 3.🔍 One closing tag is missing. Which one?
    <b>Cricket is fun.</b>
    <u>Rain today
    <h2>Hello, world!</h2>
    (a) </b> (b) </h2> (c) </u> (d) </small>
  4. 4.Which of these is true of a web server? (a) turns HTML into a page (b) shows line numbers (c) hosts websites online (d) has an address bar
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
  6. 6.Which of these is an opening tag? (a) </h1> (b) </body> (c) <title> (d) </li>
  7. 7.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
  8. 8.Which of these is an empty tag? (a) <img> (b) <ul> (c) <h1> (d) <p>
  9. 9.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) Art corner (b) quiz.html (c) art.html (d) news.html
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <p>My pets</p>
    line 2: <small>Fun facts
    line 3: <h1>The red kite</h1>
    (a) line 1 (b) line 2 (c) line 3
  11. 11.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  12. 12.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  13. 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <strong>The red kite</strong>
    <p>Rain today
    (a) </small> (b) </p> (c) </h1> (d) </strong>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip
    line 2: <h3>The red kite</h3>
    line 3: <h1>Rain today</h1>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  17. 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  19. 19.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  20. 20.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  21. 21.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
  22. 22.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ul>
  24. 24.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>The red kite</p>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
  25. 25.True or false: in <img>, alt tells which image to load. (a) True (b) False
  26. 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Kites fly high<br>Birds sing<br>Roses are red</p>
  28. 28.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
  30. 30.Which of these is true of a code editor? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) shows pages from the web
  31. 31.True or false: <h1> is an empty tag. (a) False (b) True
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  33. 33.True or false: <img> goes in the body. (a) False (b) True
  34. 34.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!</h3>
    <p>I love mangoes.
    <strong>Fun facts</strong>
    (a) </strong> (b) </h2> (c) </p> (d) </h3>
  35. 35.Which of these is a closing tag? (a) <h1> (b) <b> (c) </title> (d) <li>
  36. 36.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  38. 38.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  39. 39.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <h2>My best friend</h2>
  40. 40.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <h3>Our school trip</h3>
    <h3>The red kite</h3>
    <h2>Cricket is fun.</h2>

Answer key

  1. </b>
  2. <ol>
  3. </u>
  4. hosts websites online
  5. 1
  6. <title>
  7. src
  8. <img>
  9. art.html
  10. line 2
  11. <ul>
  12. to leave notes
  13. in the body
  14. </p>
  15. line 1
  16. <h1>
  17. No
  18. 300
  19. <a>
  20. <
  21. 3
  22. 6
  23. 4
  24. 2
  25. False
  26. <a href="about.html">
  27. 5
  28. a code editor
  29. 2
  30. colours code to help us
  31. False
  32. 300
  33. True
  34. </p>
  35. </title>
  36. has a closing tag
  37. src
  38. True
  39. 2
  40. 4

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