← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 222 · 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.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
  2. 2.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  3. 3.🔗 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
  4. 4.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
  5. 5.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  6. 6.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  7. 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) Good morning! (b) The red kite (c) Cricket is fun.
  9. 9.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) bus.jpg (b) Our school bus (c) fort.jpg (d) tiger.jpg
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Welcome! (c) Mars is red. (d) Class 7 Blog
  12. 12.🔠 Are headings shown in bold by default? (a) Yes (b) No
  13. 13.Which of these is an opening tag? (a) </h1> (b) </b> (c) </p> (d) <body>
  14. 14.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) I love mangoes. (d) Hello, world!
  15. 15.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <i>I love mangoes.</i>
    <u>Rain today
    (a) </h3> (b) </u> (c) </i> (d) </strong>
  16. 16.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  17. 17.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) saves our .html files
  18. 18.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  19. 19.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Roses are red</p>
  21. 21.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) href (c) Visit the site (d) Contact us
  22. 22.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
  23. 23.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Our school trip</h4>
    <p>Our school trip</p>
  24. 24.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>The red kite</p>
  25. 25.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My Hobbies (b) Mars is red. (c) Planets (d) body
  27. 27.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.True or false: in <img>, height sets how wide it is. (a) False (b) True
  29. 29.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  30. 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  31. 31.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
  32. 32.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Rain today (b) Good morning! (c) Cricket is fun.
  33. 33.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  34. 34.True or false: <ol> shows bullet points. (a) True (b) False
  35. 35.💬 Does the browser show comments on the page? (a) No (b) Yes
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  37. 37.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>I love mangoes.</h3>
    <p>My pets</p>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
  38. 38.True or false: HTML on its own cannot make tables. (a) True (b) False
  39. 39.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  40. 40.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>

Answer key

  1. <head>
  2. <ol>
  3. opens it in a new tab
  4. tags
  5. True
  6. a web server
  7. in the body
  8. The red kite
  9. a closing tag
  10. bus.jpg
  11. Class 7 Blog
  12. Yes
  13. <body>
  14. I love mangoes.
  15. </u>
  16. No
  17. saves our .html files
  18. href
  19. Yes
  20. 3
  21. Contact us
  22. alt
  23. 2
  24. 4
  25. <
  26. Planets
  27. an opening tag
  28. False
  29. a code editor
  30. <ul>
  31. the body
  32. Cricket is fun.
  33. starts a new line
  34. False
  35. No
  36. <h5>
  37. 3
  38. False
  39. <ul>
  40. 3

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