← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 647 · 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.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  2. 2.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  3. 3.Which of these is an opening tag? (a) </p> (b) <body> (c) </title> (d) </li>
  4. 4.True or false: <ol> goes inside ul or ol. (a) False (b) True
  5. 5.🌍 Which program shows a web page to us? (a) a calculator (b) a web browser (c) a paint program (d) a music player
  6. 6.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
  7. 7.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  8. 8.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  9. 9.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  10. 10.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite
    line 2: <small>I love mangoes.</small>
    line 3: <strong>Good morning!</strong>
    (a) line 2 (b) line 3 (c) line 1
  12. 12.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Our school trip (c) I love mangoes.
  13. 13.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Match report (c) Mars is red. (d) Class 7 Blog
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Fun facts (c) Hello, world!
  16. 16.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) art.html
  17. 17.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) maths.html (c) https://example.com (d) contact.html
  18. 18.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) turns HTML into a page (d) sends pages over the net
  19. 19.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!
    line 2: <em>The red kite</em>
    line 3: <h3>Rain today</h3>
    (a) line 3 (b) line 1 (c) line 2
  21. 21.🏷️ Which is the closing tag for <em>? (a) </em> (b) <\em> (c) <em/> (d) <em>
  22. 22.🔗 Where does this link open?
    <a href="games.html">School news</a>
    (a) in a new tab (b) in the same tab
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ul>
  24. 24.True or false: <ul> shows bullet points. (a) True (b) False
  25. 25.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <small>Rain today
    <u>I love mangoes.</u>
    (a) </b> (b) </small> (c) </u> (d) </em>
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Cricket Club (d) My drawings
  27. 27.Which of these is a closing tag? (a) <h1> (b) <body> (c) </title> (d) <title>
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h6>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
  29. 29.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  30. 30.Which of these is an empty tag? (a) <meta> (b) <b> (c) <li> (d) <p>
  31. 31.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) quiz.html (b) Maths fun (c) href (d) Art corner
  32. 32.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
  33. 33.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
  34. 34.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  35. 35.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  36. 36.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    (a) Good morning! (b) My best friend (c) Fun facts
  37. 37.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  38. 38.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  39. 39.True or false: a web server sends pages over the net. (a) False (b) True
  40. 40.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <h2>Cricket is fun.</h2>
    <h4>Cricket is fun.</h4>
    <h4>Good morning!</h4>

Answer key

  1. <!DOCTYPE html>
  2. <h1>
  3. <body>
  4. False
  5. a web browser
  6. 2
  7. <a>
  8. src
  9. to leave notes
  10. <h6>
  11. line 1
  12. Cricket is fun.
  13. 4
  14. Match report
  15. The red kite
  16. Take the quiz
  17. contact.html
  18. turns HTML into a page
  19. in the head
  20. line 1
  21. </em>
  22. in the same tab
  23. 4
  24. True
  25. </small>
  26. Cricket Club
  27. </title>
  28. <h6>
  29. <
  30. <meta>
  31. Maths fun
  32. <h1>
  33. a line across the page
  34. <h6>
  35. to describe the image
  36. Fun facts
  37. <li>
  38. Yes
  39. True
  40. 4

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