← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 270 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) width (b) moon.png (c) Our school bus (d) The full moon
  2. 2.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  3. 3.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  4. 4.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  7. 7.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  8. 8.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="350">
    (a) fort.jpg (b) The full moon (c) moon.png (d) bus.jpg
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Hello, world!</h3>
    <p>Cricket is fun.</p>
  10. 10.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) The full moon (b) dog.jpg (c) width (d) A happy dog
  12. 12.True or false: <ol> is one item of a list. (a) True (b) False
  13. 13.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Fun facts</h2>
    <p>Our school trip</p>
  14. 14.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  15. 15.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  17. 17.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  18. 18.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
  19. 19.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Good morning!</p>
  20. 20.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  21. 21.True or false: HTML on its own cannot make headings. (a) True (b) False
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  24. 24.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  25. 25.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
  26. 26.Which of these is an opening tag? (a) </title> (b) <p> (c) </h1> (d) </b>
  27. 27.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
  28. 28.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) Play games (c) href (d) Take the quiz
  29. 29.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
  30. 30.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) about.html (b) games.html (c) School news (d) quiz.html
  31. 31.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  32. 32.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) <body>
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
  34. 34.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  35. 35.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  36. 36.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  37. 37.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  38. 38.True or false: <ul> is an unordered list. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Hello, world! (c) I love mangoes.
  40. 40.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>

Answer key

  1. The full moon
  2. a web browser
  3. Yes
  4. in the head
  5. <h4>
  6. alt
  7. opens it in a new tab
  8. moon.png
  9. 2
  10. <ul>
  11. A happy dog
  12. False
  13. 2
  14. on the browser tab
  15. <!DOCTYPE html>
  16. <h6>
  17. in the body
  18. </i>
  19. 1
  20. 3
  21. False
  22. 1
  23. <h2>
  24. No
  25. 1
  26. <p>
  27. <h6>
  28. Take the quiz
  29. the body
  30. quiz.html
  31. False
  32. <!DOCTYPE html>
  33. <h1>
  34. as one space
  35. Language
  36. <img>
  37. alt
  38. True
  39. Hello, world!
  40. <h2>

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