← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 175 · 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 doctype (c) the body (d) the title
  2. 2.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) shows pages from the web (d) opens web pages for us
  3. 3.Which of these is a closing tag? (a) <h1> (b) </p> (c) <title> (d) <b>
  4. 4.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
  5. 5.🔍 One closing tag is missing. Which one?
    <small>Cricket is fun.
    <h1>Our school trip</h1>
    <u>Rain today</u>
    (a) </u> (b) </h2> (c) </small> (d) </h1>
  6. 6.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My Hobbies (c) body (d) Easy snacks
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Kites fly high<br>Birds sing</p>
  10. 10.True or false: a web browser is where we type code. (a) False (b) True
  11. 11.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  12. 12.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) answers page requests
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="250">
    (a) Our school bus (b) moon.png (c) The full moon (d) width
  14. 14.True or false: a code editor shows pages from the web. (a) False (b) True
  15. 15.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <img>
  16. 16.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <h2>Fun facts</h2>
    <b>Cricket is fun.
    (a) </h3> (b) </h2> (c) </p> (d) </b>
  17. 17.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) An old fort (c) bus.jpg (d) width
  19. 19.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
  20. 20.Which of these is an empty tag? (a) <b> (b) <title> (c) <ul> (d) <meta>
  21. 21.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  22. 22.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
  23. 23.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) shows pages from the web (d) is where we type code
  24. 24.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  25. 25.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  26. 26.Which of these is an empty tag? (a) <title> (b) <b> (c) <h1> (d) <img>
  27. 27.True or false: a web server stores a website’s files. (a) True (b) False
  28. 28.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) </em> (d) <\em>
  29. 29.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    (a) Rain today (b) I love mangoes. (c) Good morning!
  30. 30.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔍 One closing tag is missing. Which one?
    <b>My best friend
    <h3>The red kite</h3>
    <u>I love mangoes.</u>
    (a) </em> (b) </u> (c) </b> (d) </h3>
  32. 32.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Rain today (b) Our school trip (c) Good morning! (d) Fun facts
  33. 33.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
  34. 34.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Good morning!</h2>
    <h2>Fun facts</h2>
    <p>The red kite</p>
    <p>Rain today</p>
  35. 35.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  36. 36.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>My pets</h2>
    <p>Good morning!</p>
  37. 37.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    (a) Our school trip (b) My best friend (c) The red kite (d) Good morning!
  38. 38.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) src (d) width
  39. 39.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  40. 40.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server

Answer key

  1. the body
  2. shows line numbers
  3. </p>
  4. 3
  5. </small>
  6. opens it in a new tab
  7. Easy snacks
  8. element
  9. 4
  10. False
  11. <h1>
  12. opens web pages for us
  13. The full moon
  14. False
  15. <img>
  16. </b>
  17. <
  18. Our school bus
  19. 2
  20. <meta>
  21. <ol>
  22. <h6>
  23. shows pages from the web
  24. href
  25. <!--
  26. <img>
  27. True
  28. </em>
  29. Rain today
  30. in the body
  31. </b>
  32. Rain today
  33. alt
  34. 3
  35. a web server
  36. 2
  37. Good morning!
  38. width
  39. Yes
  40. a web server

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