← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 899 · 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 attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  2. 2.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  3. 3.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  4. 4.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  6. 6.True or false: <ol> lists things in any order. (a) True (b) False
  7. 7.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) width (b) Map of India (c) A red kite (d) kite.png
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  10. 10.True or false: <li> shows bullet points. (a) True (b) False
  11. 11.🔗 Where does this link open?
    <a href="about.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  12. 12.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  14. 14.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  15. 15.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) Take the quiz (b) contact.html (c) School news (d) href
  16. 16.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  17. 17.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
  18. 18.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  19. 19.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Maths fun (b) about.html (c) href (d) Visit the site
  20. 20.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  21. 21.🔍 One closing tag is missing. Which one?
    <b>Good morning!</b>
    <i>Rain today</i>
    <strong>My best friend
    (a) </strong> (b) </i> (c) </small> (d) </b>
  22. 22.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  23. 23.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>The red kite</p>
    <h3>Fun facts</h3>
  26. 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  27. 27.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  28. 28.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Hello, world! (c) My best friend (d) The red kite
  30. 30.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  32. 32.True or false: <a> goes in the body. (a) False (b) True
  33. 33.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) The red kite (c) My best friend (d) Hello, world!
  34. 34.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <h3>Rain today
    line 3: <h2>The red kite</h2>
    (a) line 3 (b) line 1 (c) line 2
  36. 36.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  37. 37.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  38. 38.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  39. 39.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <h1> (d) <p>
  40. 40.🔍 One closing tag is missing. Which one?
    <b>Good morning!
    <i>The red kite</i>
    <strong>Fun facts</strong>
    (a) </strong> (b) </b> (c) </h2> (d) </i>

Answer key

  1. alt
  2. <!DOCTYPE html>
  3. No
  4. a paragraph
  5. bullets
  6. False
  7. <h5>
  8. A red kite
  9. A tiger asleep
  10. False
  11. in a new tab
  12. has a closing tag
  13. <h1>
  14. <ul>
  15. School news
  16. on the browser tab
  17. <h6>
  18. Yes
  19. Visit the site
  20. in the head
  21. </strong>
  22. <li>
  23. in the head
  24. a code editor
  25. 2
  26. <ol>
  27. a web server
  28. to leave notes
  29. My best friend
  30. <ul>
  31. 150
  32. True
  33. My best friend
  34. False
  35. line 2
  36. opens it in a new tab
  37. No
  38. <img>
  39. <h6>
  40. </b>

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