← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 514 · 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 text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    (a) Fun facts (b) I love mangoes. (c) Hello, world!
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  3. 3.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
  4. 4.True or false: <title> is an empty tag. (a) True (b) False
  5. 5.Which of these goes in the head? (a) <p> (b) <a> (c) <h1> (d) <style>
  6. 6.True or false: <title> goes in the body. (a) False (b) True
  7. 7.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
  8. 8.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  9. 9.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  10. 10.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  11. 11.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  12. 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  13. 13.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
  14. 14.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) about.html (b) games.html (c) contact.html (d) Maths fun
  15. 15.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  16. 16.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Mars is red. (c) body (d) Welcome!
  18. 18.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
  19. 19.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
  20. 20.True or false: <a> goes in the head. (a) True (b) False
  21. 21.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  22. 22.Which of these is an empty tag? (a) <hr> (b) <title> (c) <p> (d) <b>
  23. 23.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  25. 25.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) Hello, world! (c) Fun facts (d) Rain today
  26. 26.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) maths.html (b) href (c) About us (d) Contact us
  27. 27.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Welcome! (c) Space Facts (d) body
  30. 30.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
  31. 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
  32. 32.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>My pets</p>
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    <p>My best friend</p>
    (a) My best friend (b) Rain today (c) My pets (d) The red kite
  34. 34.Which of these is an opening tag? (a) <h1> (b) </h1> (c) </b> (d) </li>
  35. 35.📋 What number does the browser show next to “Orange”?
    <ol start="4">
      <li>Banana</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  36. 36.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  37. 37.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  38. 38.True or false: HTML on its own can run a game loop. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) My best friend (c) Cricket is fun.
  40. 40.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>

Answer key

  1. I love mangoes.
  2. 300
  3. a plain text editor
  4. False
  5. <style>
  6. False
  7. <h5>
  8. href
  9. element
  10. <ul>
  11. 4
  12. Yes
  13. a paragraph
  14. games.html
  15. alt
  16. 3
  17. Welcome!
  18. <h6>
  19. width
  20. False
  21. <
  22. <hr>
  23. True
  24. a slash /
  25. Cricket is fun.
  26. About us
  27. has a closing tag
  28. 1
  29. Welcome!
  30. <h6>
  31. as one space
  32. 5
  33. My pets
  34. <h1>
  35. 5
  36. <!DOCTYPE html>
  37. bullets
  38. False
  39. My best friend
  40. <a>

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