← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 546 · 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.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  2. 2.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <\h3> (c) <h3/> (d) <h3>
  3. 3.True or false: a web browser opens web pages for us. (a) True (b) False
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
  5. 5.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  6. 6.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) is where we type code (d) opens web pages for us
  8. 8.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  9. 9.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <h2>I love mangoes.</h2>
    <i>Hello, world!</i>
    (a) </h3> (b) </h2> (c) </i> (d) </p>
  10. 10.True or false: in <img>, src names the picture file. (a) False (b) True
  11. 11.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) contact.html (c) https://example.com (d) about.html
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <b>Cricket is fun.
    line 3: <h3>My pets</h3>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) Take the quiz (b) games.html (c) quiz.html (d) news.html
  15. 15.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  16. 16.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Sky is blue<br>Roses are red</p>
  18. 18.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  19. 19.Which of these is an opening tag? (a) <body> (b) </body> (c) </p> (d) </li>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon
  21. 21.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
  24. 24.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
  25. 25.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    (a) My best friend (b) Good morning! (c) Rain today
  26. 26.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) https://example.com (b) contact.html (c) maths.html (d) School news
  27. 27.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  28. 28.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <p>Rain today</p>
    <p>My pets</p>
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Rain today</h3>
    <h2>Our school trip</h2>
  30. 30.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
  31. 31.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  32. 32.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) hosts websites online (d) stores a website’s files
  33. 33.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    (a) I love mangoes. (b) My best friend (c) Cricket is fun. (d) My pets
  34. 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  37. 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
  39. 39.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.True or false: <h1> goes in the head. (a) False (b) True

Answer key

  1. Yes
  2. </h3>
  3. True
  4. 1
  5. opens it in a new tab
  6. a closing tag
  7. opens web pages for us
  8. <ul>
  9. </h3>
  10. True
  11. about.html
  12. 2
  13. line 2
  14. news.html
  15. to describe the image
  16. a closing tag
  17. 4
  18. as one space
  19. <body>
  20. moon.png
  21. in the head
  22. No
  23. 1
  24. alt
  25. Rain today
  26. contact.html
  27. <h2>
  28. 3
  29. 3
  30. <h1>
  31. <
  32. shows line numbers
  33. My best friend
  34. src
  35. 50
  36. 2
  37. an empty tag
  38. 3
  39. in the head
  40. False

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