← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 616 · 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: <li> has a closing tag. (a) True (b) False
  2. 2.True or false: a web browser answers page requests. (a) True (b) False
  3. 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  4. 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
  5. 5.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h5>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
  7. 7.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  8. 8.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) maths.html (b) Art corner (c) https://example.com (d) art.html
  9. 9.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <h4>Hello, world!</h4>
  10. 10.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  11. 11.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Our school trip</h2>
    <h2>My pets</h2>
  12. 12.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) contact.html (b) games.html (c) about.html (d) Take the quiz
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  14. 14.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  15. 15.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <h2>My pets</h2>
  17. 17.Which of these is true of a web server? (a) colours code to help us (b) has an address bar (c) opens web pages for us (d) answers page requests
  18. 18.📄 Can HTML on its own make headings? (a) Yes (b) No
  19. 19.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  20. 20.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) sends pages over the net (d) shows line numbers
  21. 21.True or false: a web server turns HTML into a page. (a) True (b) False
  22. 22.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  23. 23.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  24. 24.Which of these has a closing tag? (a) <title> (b) <hr> (c) <meta> (d) <br>
  25. 25.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
  27. 27.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  29. 29.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
  30. 30.Which of these is true of a web browser? (a) hosts websites online (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Birds sing</p>
  32. 32.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  33. 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <title> (d) <style>
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) The red kite (c) Good morning! (d) I love mangoes.
  35. 35.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <a>
  36. 36.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  37. 37.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
  38. 38.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
  39. 39.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  40. 40.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server

Answer key

  1. True
  2. False
  3. width
  4. Yes
  5. in the body
  6. <h6>
  7. No
  8. https://example.com
  9. 2
  10. 4
  11. 3
  12. games.html
  13. A tiger asleep
  14. a slash /
  15. False
  16. 2
  17. answers page requests
  18. Yes
  19. <ol>
  20. sends pages over the net
  21. False
  22. <li>
  23. href
  24. <title>
  25. an opening tag
  26. <h6>
  27. a closing tag
  28. <h3>
  29. 2
  30. turns HTML into a page
  31. 3
  32. a web browser
  33. <p>
  34. Good morning!
  35. <a>
  36. in the same tab
  37. src
  38. to leave notes
  39. <h6>
  40. a web browser

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