← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 640 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A tiger asleep (b) tiger.jpg (c) width (d) A red kite
  2. 2.True or false: HTML on its own can make tables. (a) False (b) True
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) Hello, world! (b) I love mangoes. (c) My best friend (d) Rain today
  4. 4.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  6. 6.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Kites fly high<br>Rivers flow<br>Stars shine</p>
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) Our school trip (b) The red kite (c) Rain today
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  10. 10.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  11. 11.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  13. 13.🔗 Where does this link open?
    <a href="art.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  14. 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
  15. 15.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <b> (d) <br>
  16. 16.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <b>I love mangoes.</b>
    line 3: <small>Good morning!
    (a) line 2 (b) line 1 (c) line 3
  18. 18.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) Hello, world! (b) Rain today (c) My best friend
  19. 19.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  20. 20.Which of these is an opening tag? (a) <b> (b) </h1> (c) </body> (d) </b>
  21. 21.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  22. 22.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  23. 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) My drawings (d) Thanks for visiting.
  25. 25.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  26. 26.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  27. 27.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>I love mangoes.</h4>
    <h2>I love mangoes.</h2>
    <h2>My best friend</h2>
    <h3>Cricket is fun.</h3>
  28. 28.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  29. 29.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) bus.jpg (c) dog.jpg (d) moon.png
  30. 30.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  32. 32.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>I love mangoes.</p>
    <p>My pets</p>
  33. 33.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  34. 34.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend</strong>
    line 2: <h3>Fun facts</h3>
    line 3: <u>The red kite
    (a) line 2 (b) line 1 (c) line 3
  36. 36.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Good morning!</h3>
    <h4>The red kite</h4>
    <h3>My pets</h3>
  37. 37.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  38. 38.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>My pets</p>
  39. 39.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>

Answer key

  1. A tiger asleep
  2. True
  3. Hello, world!
  4. alt
  5. opens it in a new tab
  6. 2
  7. 5
  8. Our school trip
  9. 2
  10. No
  11. has a closing tag
  12. 6
  13. in the same tab
  14. element
  15. <b>
  16. turns HTML into a page
  17. line 3
  18. My best friend
  19. href
  20. <b>
  21. the body
  22. 4
  23. Yes
  24. My drawings
  25. a web browser
  26. 4
  27. 5
  28. No
  29. dog.jpg
  30. Yes
  31. <h6>
  32. 1
  33. <
  34. No
  35. line 3
  36. 4
  37. <!DOCTYPE html>
  38. 3
  39. in a new tab
  40. </h1>

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