← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 140 · 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 of these is an empty tag? (a) <b> (b) <title> (c) <input> (d) <p>
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  3. 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  5. 5.True or false: HTML on its own cannot make a form. (a) False (b) True
  6. 6.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  7. 7.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) art.html (d) maths.html
  8. 8.True or false: a web browser colours code to help us. (a) False (b) True
  9. 9.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  10. 10.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) </small> (d) <small>
  11. 11.🔍 One closing tag is missing. Which one?
    <i>Fun facts
    <p>Good morning!</p>
    <em>Cricket is fun.</em>
    (a) </em> (b) </h1> (c) </i> (d) </p>
  12. 12.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
  13. 13.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) About us (c) maths.html (d) href
  15. 15.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  17. 17.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    (a) The red kite (b) My pets (c) Hello, world!
  18. 18.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Rain today</h2>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  19. 19.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Hello, world! (c) Our school trip (d) The red kite
  20. 20.True or false: a web browser sends pages over the net. (a) True (b) False
  21. 21.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Rivers flow</p>
  23. 23.True or false: in <img>, alt names the picture file. (a) True (b) False
  24. 24.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  25. 25.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) <p> (d) </p>
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Hello, world! (c) The red kite (d) Rain today
  27. 27.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  28. 28.Which of these has a closing tag? (a) <hr> (b) <img> (c) <ul> (d) <meta>
  29. 29.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  30. 30.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  31. 31.True or false: <img> has a closing tag. (a) True (b) False
  32. 32.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
  33. 33.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>Our school trip</p>
  34. 34.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  35. 35.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  36. 36.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  37. 37.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  39. 39.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) School news (c) href (d) Art corner
  40. 40.True or false: <ol> lists steps in order. (a) False (b) True

Answer key

  1. <input>
  2. Yes
  3. has a closing tag
  4. the body
  5. False
  6. a code editor
  7. maths.html
  8. False
  9. <ul>
  10. </small>
  11. </i>
  12. Markup
  13. a closing tag
  14. Play games
  15. <a>
  16. <h1>
  17. The red kite
  18. 3
  19. My pets
  20. False
  21. <ol>
  22. 3
  23. False
  24. in the same tab
  25. </p>
  26. Rain today
  27. opens it in a new tab
  28. <ul>
  29. has a closing tag
  30. <ul>
  31. False
  32. to describe the image
  33. 3
  34. <ol>
  35. False
  36. <a href="about.html">
  37. in the head
  38. <ol>
  39. Art corner
  40. True

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