← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 980 · 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.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Good morning!</p>
  2. 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  3. 3.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  4. 4.True or false: <li> goes inside ul or ol. (a) True (b) False
  5. 5.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <h4>The red kite</h4>
    <p>My best friend</p>
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.
    line 2: <h3>Hello, world!</h3>
    line 3: <strong>I love mangoes.</strong>
    (a) line 1 (b) line 3 (c) line 2
  7. 7.True or false: <title> goes in the head. (a) False (b) True
  8. 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  9. 9.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  10. 10.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) </h3> (d) <\h3>
  11. 11.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) <!DOCTYPE html> (d) </html>
  12. 12.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    (a) My pets (b) Cricket is fun. (c) The red kite (d) Fun facts
  13. 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) href (b) Play games (c) https://example.com (d) About us
  15. 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  16. 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
  17. 17.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <small>I love mangoes.</small>
    line 2: <u>My best friend
    line 3: <em>Rain today</em>
    (a) line 3 (b) line 1 (c) line 2
  19. 19.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  20. 20.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  21. 21.Which of these is a closing tag? (a) <li> (b) <title> (c) </p> (d) <b>
  22. 22.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) news.html (b) quiz.html (c) art.html (d) Visit the site
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  26. 26.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <h3>Our school trip</h3>
    <u>Good morning!
    (a) </h2> (b) </strong> (c) </h3> (d) </u>
  27. 27.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    (a) Hello, world! (b) I love mangoes. (c) Good morning! (d) Cricket is fun.
  28. 28.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  29. 29.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  30. 30.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  31. 31.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  32. 32.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) colours (d) sound
  33. 33.True or false: <ul> goes in the head. (a) True (b) False
  34. 34.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) href (d) https://example.com
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  36. 36.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  37. 37.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
  38. 38.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  39. 39.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <br> (d) <input>
  40. 40.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>

Answer key

  1. 3
  2. <!DOCTYPE html>
  3. 1
  4. True
  5. 2
  6. line 1
  7. True
  8. Yes
  9. 2
  10. </h3>
  11. <!DOCTYPE html>
  12. Fun facts
  13. No
  14. Play games
  15. <ol>
  16. src
  17. <
  18. line 2
  19. <ol>
  20. 6
  21. </p>
  22. in the head
  23. has a closing tag
  24. art.html
  25. 400
  26. </u>
  27. Hello, world!
  28. as one space
  29. 3
  30. <img>
  31. <a href="about.html">
  32. structure
  33. False
  34. Take the quiz
  35. 400
  36. a web server
  37. 1
  38. <a>
  39. <ul>
  40. -->

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