← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 865 · 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.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  3. 3.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  4. 4.🔗 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
  5. 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  6. 6.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <title> (d) <table>
  7. 7.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  8. 8.🔠 Are headings shown in bold by default? (a) No (b) Yes
  9. 9.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <table> (d) <a>
  10. 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
  11. 11.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My Hobbies (b) Mars is red. (c) My drawings (d) index.html
  12. 12.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <title> (d) <style>
  13. 13.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) Play games (d) href
  14. 14.🔍 One closing tag is missing. Which one?
    <em>Hello, world!
    <p>Rain today</p>
    <h1>I love mangoes.</h1>
    (a) </p> (b) </em> (c) </h1> (d) </strong>
  15. 15.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Good morning! (b) The red kite (c) Hello, world!
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) Cricket Club (c) I like to read. (d) body
  18. 18.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
  20. 20.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) School news (b) art.html (c) Art corner (d) href
  21. 21.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  22. 22.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  23. 23.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
  24. 24.True or false: a code editor sends pages over the net. (a) True (b) False
  25. 25.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) contact.html (b) Maths fun (c) https://example.com (d) about.html
  26. 26.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) shows line numbers
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    (a) The red kite (b) Hello, world! (c) Good morning!
  28. 28.True or false: <title> is an empty tag. (a) False (b) True
  29. 29.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  30. 30.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) href (b) Maths fun (c) news.html (d) Visit the site
  31. 31.True or false: <img> is an empty tag. (a) True (b) False
  32. 32.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  33. 33.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
  35. 35.🌍 Which program shows a web page to us? (a) a web browser (b) a paint program (c) a calculator (d) a music player
  36. 36.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.Which of these has a closing tag? (a) <input> (b) <meta> (c) <hr> (d) <ul>
  38. 38.Which of these is a closing tag? (a) </h1> (b) <li> (c) <h1> (d) <body>
  39. 39.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  40. 40.Which of these is an opening tag? (a) <p> (b) </li> (c) </h1> (d) </p>

Answer key

  1. an opening tag
  2. alt
  3. No
  4. opens it in a new tab
  5. <a href="about.html">
  6. <table>
  7. <li>
  8. Yes
  9. <meta charset="utf-8">
  10. <h6>
  11. My Hobbies
  12. <img>
  13. Take the quiz
  14. </em>
  15. in the head
  16. The red kite
  17. Welcome!
  18. has a closing tag
  19. <h1>
  20. Art corner
  21. Yes
  22. bullets
  23. </h2>
  24. False
  25. about.html
  26. stores a website’s files
  27. Good morning!
  28. False
  29. an opening tag
  30. Visit the site
  31. True
  32. a code editor
  33. <h1>
  34. 3
  35. a web browser
  36. in the body
  37. <ul>
  38. </h1>
  39. <
  40. <p>

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