← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 298 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Rivers flow</p>
  2. 2.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  3. 3.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  4. 4.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  5. 5.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  6. 6.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Sky is blue<br>Birds sing</p>
  8. 8.True or false: a web browser colours code to help us. (a) True (b) False
  9. 9.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <h2>My pets</h2>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
  10. 10.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
  11. 11.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    (a) Rain today (b) The red kite (c) Good morning!
  12. 12.Which of these has a closing tag? (a) <h1> (b) <br> (c) <img> (d) <meta>
  13. 13.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  14. 14.True or false: <input> is an empty tag. (a) True (b) False
  15. 15.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <i/> (d) <\i>
  16. 16.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <h2>My best friend</h2>
    <p>Rain today</p>
    <h2>My best friend</h2>
  17. 17.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
  19. 19.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) shows pages from the web (d) stores a website’s files
  20. 20.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    (a) My best friend (b) Fun facts (c) Our school trip
  22. 22.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  23. 23.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) href (b) about.html (c) School news (d) Art corner
  24. 24.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.
    <h3>Good morning!</h3>
    <small>Fun facts</small>
    (a) </small> (b) </i> (c) </h3> (d) </h2>
  25. 25.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) Hello, world! (c) The red kite (d) Rain today
  26. 26.True or false: HTML on its own can make a form. (a) True (b) False
  27. 27.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) I love mangoes. (c) My pets (d) Our school trip
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
  29. 29.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) Our school trip (d) My best friend
  30. 30.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  31. 31.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  32. 32.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  33. 33.🔍 One closing tag is missing. Which one?
    <p>My best friend
    <u>Hello, world!</u>
    <h1>My pets</h1>
    (a) </u> (b) </h1> (c) </p> (d) </em>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) width (c) A happy dog (d) The full moon
  35. 35.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  36. 36.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  37. 37.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  38. 38.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) </html> (b) <body>
  39. 39.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  40. 40.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <h2>My pets</h2>
    <p>I love mangoes.</p>

Answer key

  1. 3
  2. <h1>
  3. a web server
  4. on the browser tab
  5. 1
  6. <a href="about.html">
  7. 4
  8. False
  9. 4
  10. <h6>
  11. Good morning!
  12. <h1>
  13. <li>
  14. True
  15. </i>
  16. 2
  17. href
  18. 2
  19. shows pages from the web
  20. in the body
  21. Fun facts
  22. opens it in a new tab
  23. Art corner
  24. </h2>
  25. Hello, world!
  26. True
  27. Our school trip
  28. 1
  29. Fun facts
  30. to leave notes
  31. <a>
  32. 1
  33. </p>
  34. A happy dog
  35. <h1>
  36. in a new tab
  37. an attribute
  38. <body>
  39. True
  40. 3

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