← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 172 · 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 part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  2. 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  3. 3.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <p>My pets</p>
    <h4>Good morning!</h4>
    <p>Good morning!</p>
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Kites fly high</p>
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    (a) Cricket is fun. (b) The red kite (c) I love mangoes.
  6. 6.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  7. 7.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) Visit the site (c) news.html (d) art.html
  8. 8.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  9. 9.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>My pets</p>
  10. 10.🔗 Where does this link open?
    <a href="maths.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  11. 11.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  12. 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  13. 13.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) hosts websites online
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Art Gallery (d) Planets
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
  16. 16.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
  17. 17.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) Take the quiz (b) School news (c) news.html (d) href
  18. 18.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <p>The red kite</p>
    <h2>Fun facts</h2>
  19. 19.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>I love mangoes.</h3>
    <h4>Good morning!</h4>
  20. 20.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>My pets</p>
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
  22. 22.Which of these is an opening tag? (a) </title> (b) </h1> (c) <li> (d) </p>
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
  24. 24.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  25. 25.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    (a) The red kite (b) Our school trip (c) Good morning!
  27. 27.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
  28. 28.True or false: a web browser opens web pages for us. (a) False (b) True
  29. 29.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today</u>
    line 2: <i>Our school trip
    line 3: <h3>Hello, world!</h3>
    (a) line 1 (b) line 3 (c) line 2
  31. 31.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
  34. 34.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  35. 35.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) news.html (c) art.html (d) Contact us
  36. 36.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  37. 37.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
  39. 39.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
  40. 40.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading

Answer key

  1. the body
  2. <a>
  3. 2
  4. 3
  5. I love mangoes.
  6. <!--
  7. art.html
  8. <!DOCTYPE html>
  9. 4
  10. in the same tab
  11. <li>
  12. a slash /
  13. hosts websites online
  14. Art Gallery
  15. 1
  16. Language
  17. School news
  18. 3
  19. 3
  20. 4
  21. alt
  22. <li>
  23. 1
  24. in a new tab
  25. False
  26. Good morning!
  27. src
  28. True
  29. to leave notes
  30. line 2
  31. a closing tag
  32. No
  33. as one space
  34. <h1>
  35. maths.html
  36. in the same tab
  37. 6
  38. <h5>
  39. <h5>
  40. on the browser tab

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