← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 534 · 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 is the odd one out? (a) stores a website’s files (b) answers page requests (c) colours code to help us (d) hosts websites online
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high<br>Stars shine</p>
  3. 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) Thanks for visiting. (c) index.html (d) My Hobbies
  7. 7.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  8. 8.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon
  9. 9.True or false: HTML on its own cannot make headings. (a) True (b) False
  10. 10.🔍 One closing tag is missing. Which one?
    <strong>Fun facts</strong>
    <h2>My best friend</h2>
    <i>Cricket is fun.
    (a) </h2> (b) </i> (c) </h3> (d) </strong>
  11. 11.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Roses are red</p>
  13. 13.True or false: <title> has a closing tag. (a) False (b) True
  14. 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) contact.html (c) About us (d) href
  16. 16.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  17. 17.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
  18. 18.Which of these is true of a code editor? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) sends pages over the net
  19. 19.True or false: in <img>, src tells which image to load. (a) False (b) True
  20. 20.True or false: <hr> has a closing tag. (a) True (b) False
  21. 21.True or false: a web browser turns HTML into a page. (a) False (b) True
  22. 22.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  25. 25.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <h2>Hello, world!</h2>
  26. 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  27. 27.True or false: <li> shows bullet points. (a) True (b) False
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  29. 29.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
  30. 30.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <p>Rain today</p>
    <p>My pets</p>
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) </body> (d) <!DOCTYPE html>
  32. 32.🔍 One closing tag is missing. Which one?
    <h3>Good morning!
    <i>I love mangoes.</i>
    <strong>My best friend</strong>
    (a) </i> (b) </strong> (c) </u> (d) </h3>
  33. 33.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  34. 34.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  35. 35.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  36. 36.Which of these goes in the head? (a) <table> (b) <style> (c) <img> (d) <h1>
  37. 37.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.</h3>
    <strong>Fun facts</strong>
    <b>My pets
    (a) </b> (b) </h3> (c) </strong> (d) </i>
  38. 38.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in a new tab (b) in the same tab
  39. 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Class 7 Blog (c) index.html (d) All about me

Answer key

  1. colours code to help us
  2. 5
  3. an empty tag
  4. </i>
  5. opens it in a new tab
  6. My Hobbies
  7. <a href="about.html">
  8. moon.png
  9. False
  10. </i>
  11. 1
  12. 4
  13. True
  14. in the body
  15. About us
  16. -->
  17. 3
  18. saves our .html files
  19. True
  20. False
  21. True
  22. in the head
  23. <ol>
  24. 2
  25. 2
  26. <ol>
  27. False
  28. <h6>
  29. a plain text editor
  30. 5
  31. <!DOCTYPE html>
  32. </h3>
  33. <ol>
  34. <h1>
  35. False
  36. <style>
  37. </b>
  38. in the same tab
  39. an attribute
  40. Class 7 Blog

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