← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 844 · 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.True or false: a web server shows line numbers. (a) False (b) True
  2. 2.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) alt (d) src
  3. 3.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  4. 4.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) very big text (d) secret text
  5. 5.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  6. 6.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  7. 7.Which of these is a closing tag? (a) <b> (b) <li> (c) <body> (d) </h1>
  8. 8.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    (a) Cricket is fun. (b) The red kite (c) Our school trip (d) Hello, world!
  10. 10.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  11. 11.True or false: <img> goes in the body. (a) True (b) False
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) We won by 5 runs. (c) index.html (d) Easy snacks
  13. 13.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
  15. 15.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
  17. 17.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  18. 18.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Rain today</p> -->
  19. 19.True or false: in <img>, width is read by screen readers. (a) True (b) False
  20. 20.True or false: <ul> goes in the body. (a) False (b) True
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <b>My pets
    line 2: <strong>Rain today</strong>
    line 3: <i>Hello, world!</i>
    (a) line 2 (b) line 3 (c) line 1
  22. 22.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
  23. 23.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  24. 24.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
  25. 25.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
  26. 26.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
  27. 27.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
  28. 28.Which of these is an opening tag? (a) </h1> (b) <body> (c) </b> (d) </body>
  29. 29.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Birds sing<br>Stars shine</p>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) Our school bus (c) width (d) moon.png
  32. 32.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) games.html (c) About us (d) href
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) width (b) A happy dog (c) cake.jpg (d) Birthday cake
  35. 35.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  36. 36.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
  37. 37.True or false: HTML on its own cannot make headings. (a) True (b) False
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <i>Our school trip</i>
    line 2: <h1>Hello, world!
    line 3: <u>Cricket is fun.</u>
    (a) line 2 (b) line 3 (c) line 1
  39. 39.Which of these goes in the head? (a) <img> (b) <h1> (c) <ul> (d) <meta charset="utf-8">
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Match report (c) index.html (d) We won by 5 runs.

Answer key

  1. False
  2. height
  3. a code editor
  4. text with links
  5. Markup
  6. Yes
  7. </h1>
  8. has a closing tag
  9. Cricket is fun.
  10. a slash /
  11. True
  12. Space Facts
  13. a closing tag
  14. Yes
  15. <!DOCTYPE html>
  16. 4
  17. 3
  18. 1
  19. False
  20. True
  21. line 1
  22. 4
  23. <li>
  24. 2
  25. a paragraph
  26. <h5>
  27. <h5>
  28. <body>
  29. 5
  30. 5
  31. The full moon
  32. in the body
  33. Play games
  34. Birthday cake
  35. <li>
  36. alt
  37. False
  38. line 2
  39. <meta charset="utf-8">
  40. Class 7 Blog

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