← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 903 · 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.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    (a) Fun facts (b) The red kite (c) Cricket is fun. (d) I love mangoes.
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow</p>
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>Fun facts</p>
    (a) Our school trip (b) Cricket is fun. (c) My pets (d) Fun facts
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  7. 7.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) href (b) Take the quiz (c) art.html (d) School news
  8. 8.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  9. 9.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  10. 10.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  11. 11.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a calculator (d) a paint program
  12. 12.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
  13. 13.True or false: a code editor shows line numbers. (a) True (b) False
  14. 14.Which of these is true of a code editor? (a) shows pages from the web (b) stores a website’s files (c) hosts websites online (d) saves our .html files
  15. 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  17. 17.🔗 Which address opens when you click this link?
    <a href="maths.html">School news</a>
    (a) maths.html (b) art.html (c) School news (d) news.html
  18. 18.Which of these is true of a web server? (a) saves our .html files (b) has an address bar (c) hosts websites online (d) shows line numbers
  19. 19.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) stores a website’s files (d) answers page requests
  20. 20.True or false: HTML on its own cannot make a form. (a) False (b) True
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <b>My best friend</b>
    line 3: <u>The red kite
    (a) line 3 (b) line 1 (c) line 2
  22. 22.Which of these has a closing tag? (a) <meta> (b) <li> (c) <input> (d) <br>
  23. 23.True or false: a web browser turns HTML into a page. (a) False (b) True
  24. 24.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  26. 26.📄 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) body (b) My Hobbies (c) Thanks for visiting. (d) Easy snacks
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
  28. 28.True or false: in <img>, width sets how wide it is. (a) False (b) True
  29. 29.Which of these is true of a code editor? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) shows pages from the web
  30. 30.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <b>My pets
    line 2: <h1>My best friend</h1>
    line 3: <h3>Our school trip</h3>
    (a) line 1 (b) line 3 (c) line 2
  32. 32.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  33. 33.True or false: <meta> is an empty tag. (a) False (b) True
  34. 34.Which of these is an opening tag? (a) <p> (b) </h1> (c) </p> (d) </li>
  35. 35.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  36. 36.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  37. 37.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) colours code to help us
  38. 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
  39. 39.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
  40. 40.True or false: a code editor sends pages over the net. (a) True (b) False

Answer key

  1. an empty tag
  2. <h6>
  3. Fun facts
  4. 2
  5. Our school trip
  6. 100
  7. School news
  8. <h1>
  9. <
  10. 3
  11. a web browser
  12. <ol>
  13. True
  14. saves our .html files
  15. has a closing tag
  16. 4
  17. maths.html
  18. hosts websites online
  19. shows line numbers
  20. False
  21. line 3
  22. <li>
  23. True
  24. width
  25. 1
  26. Easy snacks
  27. 2
  28. True
  29. shows line numbers
  30. Yes
  31. line 1
  32. <li>
  33. True
  34. <p>
  35. No
  36. -->
  37. turns HTML into a page
  38. <img>
  39. 1
  40. False

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