← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 356 · 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 heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  2. 2.Which of these is an empty tag? (a) <input> (b) <h1> (c) <p> (d) <ul>
  3. 3.True or false: in <img>, src names the picture file. (a) False (b) True
  4. 4.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) <em> (d) </em>
  5. 5.True or false: in <img>, width describes the picture. (a) True (b) False
  6. 6.🔗 Where does this link open?
    <a href="about.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  7. 7.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  8. 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) Try this poha. (c) Match report (d) index.html
  10. 10.Which of these is true of a web browser? (a) opens web pages for us (b) sends pages over the net (c) answers page requests (d) stores a website’s files
  11. 11.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Fun facts</h3>
    <h2>Good morning!</h2>
    <h2>Rain today</h2>
    <h2>Rain today</h2>
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Birds sing<br>Stars shine</p>
  13. 13.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) news.html
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) The full moon (c) width (d) A happy dog
  15. 15.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  16. 16.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  17. 17.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) href (d) Play games
  18. 18.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) saves our .html files (d) has an address bar
  19. 19.True or false: a web server is where we type code. (a) False (b) True
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) Welcome! (c) body (d) I like to read.
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
  22. 22.True or false: <b> has a closing tag. (a) False (b) True
  23. 23.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  24. 24.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
  25. 25.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <h2>Hello, world!
    <h3>I love mangoes.</h3>
    (a) </i> (b) </em> (c) </h3> (d) </h2>
  26. 26.Which of these is an opening tag? (a) </title> (b) </b> (c) </p> (d) <li>
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  28. 28.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  29. 29.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <head> (d) <body>
  30. 30.True or false: HTML on its own can make headings. (a) True (b) False
  31. 31.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  32. 32.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Planets (b) Here is my best one. (c) index.html (d) Class 7 Blog
  34. 34.True or false: HTML on its own can count button clicks. (a) False (b) True
  35. 35.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Good morning! (b) My pets (c) Hello, world! (d) Our school trip
  37. 37.💬 Does the browser show comments on the page? (a) Yes (b) No
  38. 38.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  39. 39.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) We won by 5 runs. (c) body (d) Match report

Answer key

  1. <h1>
  2. <input>
  3. True
  4. </em>
  5. False
  6. in the same tab
  7. a web browser
  8. has a closing tag
  9. Art Gallery
  10. opens web pages for us
  11. 5
  12. 4
  13. Art corner
  14. A happy dog
  15. -->
  16. True
  17. Take the quiz
  18. saves our .html files
  19. False
  20. Welcome!
  21. src
  22. True
  23. <h3>
  24. to leave notes
  25. </h2>
  26. <li>
  27. A tiger asleep
  28. <h2>
  29. <!DOCTYPE html>
  30. True
  31. bus.jpg
  32. <ul>
  33. Class 7 Blog
  34. False
  35. <!DOCTYPE html>
  36. Our school trip
  37. No
  38. on the browser tab
  39. <h6>
  40. Match report

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