← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 798 · 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 true of a web server? (a) hosts websites online (b) shows pages from the web (c) turns HTML into a page (d) opens web pages for us
  2. 2.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  3. 3.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) hosts websites online (d) sends pages over the net
  4. 4.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  5. 5.Which of these is true of a code editor? (a) answers page requests (b) colours code to help us (c) shows pages from the web (d) opens web pages for us
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  8. 8.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  10. 10.True or false: <a> goes in the body. (a) True (b) False
  11. 11.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  12. 12.True or false: <li> is an ordered list. (a) True (b) False
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.
    line 2: <i>Rain today</i>
    line 3: <strong>My pets</strong>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  15. 15.True or false: a code editor is where we type code. (a) False (b) True
  16. 16.True or false: in <img>, height is read by screen readers. (a) True (b) False
  17. 17.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  18. 18.Which of these is a closing tag? (a) <h1> (b) </p> (c) <p> (d) <body>
  19. 19.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) is where we type code (d) stores a website’s files
  20. 20.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg
  21. 21.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) stores a website’s files (d) colours code to help us
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  27. 27.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  28. 28.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  29. 29.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Fun facts</h2>
    <h3>Cricket is fun.</h3>
    <p>Fun facts</p>
  30. 30.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  31. 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  33. 33.🔍 One closing tag is missing. Which one?
    <p>Fun facts</p>
    <h1>Our school trip</h1>
    <h2>My pets
    (a) </h2> (b) </p> (c) </strong> (d) </h1>
  34. 34.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep
  36. 36.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
  37. 37.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
  38. 38.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  39. 39.True or false: a web server answers page requests. (a) False (b) True
  40. 40.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys

Answer key

  1. hosts websites online
  2. in the head
  3. shows line numbers
  4. <h1>
  5. colours code to help us
  6. Yes
  7. 4
  8. a slash /
  9. 1
  10. True
  11. True
  12. False
  13. line 1
  14. No
  15. True
  16. False
  17. 1
  18. </p>
  19. stores a website’s files
  20. tiger.jpg
  21. an opening tag
  22. in the body
  23. has a closing tag
  24. stores a website’s files
  25. <h5>
  26. 150
  27. <a href="about.html">
  28. cake.jpg
  29. 3
  30. a code editor
  31. Yes
  32. <ol>
  33. </h2>
  34. 6
  35. An old fort
  36. <h6>
  37. an attribute
  38. Yes
  39. True
  40. tags

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