← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 653 · 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.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  3. 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  4. 4.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <h1>My best friend</h1>
    <b>Cricket is fun.
    (a) </strong> (b) </em> (c) </b> (d) </h1>
  5. 5.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog
  7. 7.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Rain today</p>
    <h2>Hello, world!</h2>
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <h3>Fun facts
    line 3: <p>Good morning!</p>
    (a) line 3 (b) line 2 (c) line 1
  10. 10.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
  11. 11.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  12. 12.True or false: HTML on its own can keep a high score. (a) False (b) True
  13. 13.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b/> (d) <b>
  14. 14.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  15. 15.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
  16. 16.Which of these is an empty tag? (a) <title> (b) <hr> (c) <ul> (d) <b>
  17. 17.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) maths.html (d) href
  18. 18.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  19. 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  20. 20.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
  21. 21.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  23. 23.Which of these goes in the body? (a) <title> (b) <style> (c) <link rel="stylesheet"> (d) <table>
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  25. 25.True or false: <style> goes in the head. (a) True (b) False
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  27. 27.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  28. 28.True or false: HTML on its own can pick a random number. (a) True (b) False
  29. 29.True or false: <a> goes in the body. (a) True (b) False
  30. 30.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
  31. 31.Which of these is true of a web browser? (a) opens web pages for us (b) hosts websites online (c) answers page requests (d) saves our .html files
  32. 32.🔍 One closing tag is missing. Which one?
    <small>Hello, world!</small>
    <h3>My best friend</h3>
    <h2>Our school trip
    (a) </b> (b) </small> (c) </h2> (d) </h3>
  33. 33.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) Birthday cake (c) map.png (d) width
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  39. 39.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
  40. 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces

Answer key

  1. in the body
  2. a web server
  3. opens it in a new tab
  4. </b>
  5. False
  6. Birthday cake
  7. 2
  8. <h1>
  9. line 2
  10. <h6>
  11. a line across the page
  12. False
  13. </b>
  14. an attribute
  15. 1
  16. <hr>
  17. Take the quiz
  18. to leave notes
  19. Yes
  20. 2
  21. an opening tag
  22. <a>
  23. <table>
  24. numbers
  25. True
  26. 4
  27. No
  28. False
  29. True
  30. </head>
  31. opens web pages for us
  32. </h2>
  33. has a closing tag
  34. in the head
  35. <img>
  36. <h1>
  37. Map of India
  38. 350
  39. 3
  40. as one space

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