← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 73 · 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>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    (a) My best friend (b) Rain today (c) Hello, world!
  2. 2.True or false: in <img>, width sets how wide it is. (a) False (b) True
  3. 3.True or false: <input> has a closing tag. (a) True (b) False
  4. 4.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  6. 6.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  7. 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  8. 8.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) href (b) Take the quiz (c) School news (d) about.html
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) We won by 5 runs. (c) Class 7 Blog (d) Planets
  10. 10.True or false: in <img>, src names the picture file. (a) False (b) True
  11. 11.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Good morning!</h3>
    <h3>Good morning!</h3>
    <h3>Good morning!</h3>
  12. 12.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  13. 13.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
  14. 14.Which of these is a closing tag? (a) <li> (b) <body> (c) </h1> (d) <h1>
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  16. 16.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) art.html
  17. 17.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Our school trip</h3>
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <h4>My pets</h4>
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My pets (c) Rain today
  19. 19.True or false: <p> goes in the head. (a) False (b) True
  20. 20.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  21. 21.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  22. 22.True or false: in <img>, width describes the picture. (a) True (b) False
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine</p>
  24. 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) turns HTML into a page (d) saves our .html files
  26. 26.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  27. 27.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) news.html (b) About us (c) maths.html (d) art.html
  28. 28.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  29. 29.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) art.html (d) href
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  31. 31.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  32. 32.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  33. 33.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
  34. 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  35. 35.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
  37. 37.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  38. 38.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  39. 39.Which of these is true of a web browser? (a) shows line numbers (b) saves our .html files (c) turns HTML into a page (d) is where we type code
  40. 40.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>

Answer key

  1. My best friend
  2. True
  3. False
  4. a closing tag
  5. <a href="about.html">
  6. True
  7. <li>
  8. School news
  9. Class 7 Blog
  10. True
  11. 4
  12. 1
  13. shows pages from the web
  14. </h1>
  15. 50
  16. Maths fun
  17. 4
  18. Rain today
  19. False
  20. <!--
  21. <h6>
  22. False
  23. 2
  24. has a closing tag
  25. turns HTML into a page
  26. True
  27. maths.html
  28. on the browser tab
  29. Take the quiz
  30. <h1>
  31. <
  32. a web server
  33. a line across the page
  34. 6
  35. map.png
  36. a slash /
  37. opens it in a new tab
  38. a web server
  39. turns HTML into a page
  40. 3

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