← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 605 · 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 tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  2. 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  3. 3.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  4. 4.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  5. 5.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Space Facts (c) body (d) My drawings
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Roses are red<br>Birds sing</p>
  8. 8.📋 What number does the browser show next to “Grapes”?
    <ol start="9">
      <li>Mango</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  9. 9.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <html> (c) </body> (d) <!DOCTYPE html>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <i>The red kite</i>
    line 2: <h3>Good morning!</h3>
    line 3: <h2>Cricket is fun.
    (a) line 3 (b) line 2 (c) line 1
  11. 11.Which of these is true of a web browser? (a) sends pages over the net (b) stores a website’s files (c) opens web pages for us (d) shows line numbers
  12. 12.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  13. 13.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) shows pages from the web
  14. 14.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
  15. 15.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) sends pages over the net (d) answers page requests
  16. 16.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  17. 17.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.📋 What number does the browser show next to “Mango”?
    <ol start="9">
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  19. 19.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
  20. 20.Which of these has a closing tag? (a) <input> (b) <h1> (c) <img> (d) <hr>
  21. 21.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  22. 22.🏷️ Which is the closing tag for <em>? (a) <\em> (b) </em> (c) <em/> (d) <em>
  23. 23.True or false: in <img>, width tells which image to load. (a) True (b) False
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  25. 25.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>My pets</h2>
    <p>Cricket is fun.</p>
  26. 26.True or false: <b> has a closing tag. (a) True (b) False
  27. 27.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  28. 28.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  29. 29.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) colours code to help us (d) is where we type code
  30. 30.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) <i> (d) </i>
  31. 31.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
  32. 32.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  33. 33.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <h2>My pets</h2>
  34. 34.True or false: <br> has a closing tag. (a) True (b) False
  35. 35.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>Good morning!</p>
  36. 36.True or false: <a> goes in the head. (a) True (b) False
  37. 37.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
  38. 38.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  39. 39.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
  40. 40.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) has an address bar

Answer key

  1. <a>
  2. <!DOCTYPE html>
  3. <h1>
  4. opens it in a new tab
  5. the body
  6. My drawings
  7. 4
  8. 10
  9. <!DOCTYPE html>
  10. line 3
  11. opens web pages for us
  12. cake.jpg
  13. shows pages from the web
  14. on the browser tab
  15. turns HTML into a page
  16. False
  17. has a closing tag
  18. 14
  19. 3
  20. <h1>
  21. True
  22. </em>
  23. False
  24. 2
  25. 3
  26. True
  27. <
  28. a slash /
  29. stores a website’s files
  30. </i>
  31. 2
  32. <ul>
  33. 3
  34. False
  35. 2
  36. False
  37. 2
  38. a web browser
  39. width
  40. has an address bar

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