← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 407 · 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.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <h1>Good morning!</h1>
    <em>The red kite
    (a) </strong> (b) </h1> (c) </em> (d) </p>
  2. 2.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
  3. 3.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  4. 4.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  5. 5.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  6. 6.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <h3>Hello, world!</h3>
  8. 8.True or false: <ul> lists steps in order. (a) True (b) False
  9. 9.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  10. 10.True or false: <ul> shows bullet points. (a) False (b) True
  11. 11.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  12. 12.True or false: HTML on its own can make bullet lists. (a) False (b) True
  13. 13.Which of these is an empty tag? (a) <p> (b) <hr> (c) <h1> (d) <ul>
  14. 14.Which of these goes in the head? (a) <h1> (b) <img> (c) <ul> (d) <link rel="stylesheet">
  15. 15.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  16. 16.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.True or false: <h1> is an empty tag. (a) True (b) False
  18. 18.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .html (d) .mp3
  19. 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  20. 20.📋 What number does the browser show next to “Orange”?
    <ol start="9">
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  21. 21.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
  22. 22.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) games.html (b) quiz.html (c) Art corner (d) news.html
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <h2>The red kite</h2>
    line 2: <em>Fun facts</em>
    line 3: <i>Hello, world!
    (a) line 2 (b) line 1 (c) line 3
  25. 25.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  27. 27.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  28. 28.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  29. 29.🔗 Where does this link open?
    <a href="maths.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  30. 30.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
  31. 31.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a printer (d) a microphone
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing</p>
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  34. 34.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  35. 35.🔍 One closing tag is missing. Which one?
    <b>My best friend
    <p>Fun facts</p>
    <h3>Our school trip</h3>
    (a) </h3> (b) </p> (c) </strong> (d) </b>
  36. 36.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h3>I love mangoes.</h3>
    <h2>I love mangoes.</h2>
  37. 37.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) contact.html (b) https://example.com (c) School news (d) about.html
  38. 38.True or false: in <img>, src is read by screen readers. (a) False (b) True
  39. 39.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  40. 40.Which of these is an opening tag? (a) </body> (b) <h1> (c) </li> (d) </h1>

Answer key

  1. </em>
  2. </h1>
  3. the body
  4. href
  5. element
  6. in the body
  7. 3
  8. False
  9. Yes
  10. True
  11. in the head
  12. True
  13. <hr>
  14. <link rel="stylesheet">
  15. <ol>
  16. an empty tag
  17. False
  18. .html
  19. Yes
  20. 10
  21. <h6>
  22. has a closing tag
  23. news.html
  24. line 3
  25. an opening tag
  26. <h1>
  27. False
  28. <h5>
  29. in the same tab
  30. to leave notes
  31. a plain text editor
  32. 2
  33. An old fort
  34. 1
  35. </b>
  36. 3
  37. about.html
  38. False
  39. a web browser
  40. <h1>

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