← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 673 · 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.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  2. 2.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
  4. 4.🔍 Which is the odd one out? (a) shows pages from the web (b) answers page requests (c) stores a website’s files (d) sends pages over the net
  5. 5.🔍 One closing tag is missing. Which one?
    <h2>Our school trip
    <u>Cricket is fun.</u>
    <em>I love mangoes.</em>
    (a) </u> (b) </em> (c) </h1> (d) </h2>
  6. 6.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
  7. 7.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  8. 8.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  9. 9.🔍 Which is the odd one out? (a) answers page requests (b) opens web pages for us (c) shows pages from the web (d) turns HTML into a page
  10. 10.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.Which of these goes in the body? (a) <p> (b) <style> (c) <title> (d) <link rel="stylesheet">
  12. 12.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  13. 13.True or false: <img> goes in the head. (a) True (b) False
  14. 14.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
  15. 15.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  16. 16.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  17. 17.📄 Can HTML on its own make headings? (a) No (b) Yes
  18. 18.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <body> (c) </html> (d) <!DOCTYPE html>
  19. 19.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  20. 20.True or false: HTML on its own can pick a random number. (a) False (b) True
  21. 21.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>
  22. 22.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  23. 23.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  24. 24.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) https://example.com (b) contact.html (c) School news (d) about.html
  27. 27.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) width (d) height
  28. 28.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
  29. 29.🔗 Where does this link open?
    <a href="games.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) The full moon (c) width (d) dog.jpg
  32. 32.True or false: HTML on its own can keep a high score. (a) True (b) False
  33. 33.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  34. 34.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Our school trip (b) The red kite (c) My best friend (d) Rain today
  35. 35.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) colours code to help us
  36. 36.📝 What do we need to write HTML? (a) a paintbrush (b) a printer (c) a microphone (d) a plain text editor
  37. 37.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  38. 38.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Class 7 Blog (d) Match report
  39. 39.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) colours code to help us (d) hosts websites online
  40. 40.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank

Answer key

  1. Yes
  2. width
  3. <h1>
  4. shows pages from the web
  5. </h2>
  6. 2
  7. starts a new line
  8. <h5>
  9. answers page requests
  10. an opening tag
  11. <p>
  12. <h6>
  13. False
  14. on the browser tab
  15. <ul>
  16. <h1>
  17. Yes
  18. </html>
  19. a web browser
  20. False
  21. </h1>
  22. alt
  23. <ol>
  24. <li>
  25. bullets
  26. about.html
  27. src
  28. an attribute
  29. in the same tab
  30. Birthday cake
  31. A happy dog
  32. False
  33. <h6>
  34. My best friend
  35. colours code to help us
  36. a plain text editor
  37. to leave notes
  38. Class 7 Blog
  39. hosts websites online
  40. opens it in a new tab

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