← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 232 · 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.Which of these is a closing tag? (a) <body> (b) </title> (c) <title> (d) <p>
  2. 2.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Hello, world! (c) Fun facts (d) I love mangoes.
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts
    line 2: <strong>Good morning!</strong>
    line 3: <em>Cricket is fun.</em>
    (a) line 2 (b) line 3 (c) line 1
  4. 4.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  5. 5.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
  6. 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
  7. 7.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <h2>Fun facts</h2>
  8. 8.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  9. 9.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.</h3>
    line 2: <small>Hello, world!
    line 3: <h2>My best friend</h2>
    (a) line 3 (b) line 1 (c) line 2
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  12. 12.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  13. 13.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  14. 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Welcome! (c) Space Facts (d) body
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  17. 17.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <h2>Fun facts</h2>
  18. 18.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    (a) The red kite (b) I love mangoes. (c) Hello, world!
  19. 19.True or false: <li> is an empty tag. (a) True (b) False
  20. 20.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) School news (b) href (c) art.html (d) Take the quiz
  21. 21.True or false: <img> goes in the body. (a) False (b) True
  22. 22.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Hot Tags (d) Home Text
  23. 23.🖼️ 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) A red kite (c) width (d) tiger.jpg
  24. 24.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) about.html (c) Take the quiz (d) href
  25. 25.Which of these is true of a web server? (a) has an address bar (b) saves our .html files (c) opens web pages for us (d) stores a website’s files
  26. 26.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="400">
  28. 28.🔍 One closing tag is missing. Which one?
    <strong>My pets</strong>
    <h3>I love mangoes.
    <h1>My best friend</h1>
    (a) </strong> (b) </i> (c) </h1> (d) </h3>
  29. 29.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  30. 30.Which of these is an empty tag? (a) <title> (b) <b> (c) <input> (d) <ul>
  31. 31.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
  32. 32.Which of these is true of a code editor? (a) is where we type code (b) stores a website’s files (c) answers page requests (d) shows pages from the web
  33. 33.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Rain today</p>
    <p>My pets</p>
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  36. 36.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
  37. 37.True or false: HTML on its own can keep a high score. (a) False (b) True
  38. 38.True or false: <h1> goes in the body. (a) True (b) False
  39. 39.True or false: in <img>, width names the picture file. (a) True (b) False
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">Take the quiz</a>
    (a) maths.html (b) art.html (c) Take the quiz (d) https://example.com

Answer key

  1. </title>
  2. My pets
  3. line 1
  4. <a>
  5. .html
  6. Yes
  7. 1
  8. No
  9. <ul>
  10. line 2
  11. alt
  12. <a href="about.html">
  13. <ul>
  14. opens it in a new tab
  15. Welcome!
  16. 3
  17. 3
  18. I love mangoes.
  19. False
  20. School news
  21. True
  22. HyperText
  23. A tiger asleep
  24. Take the quiz
  25. stores a website’s files
  26. <
  27. 400
  28. </h3>
  29. <!DOCTYPE html>
  30. <input>
  31. 1
  32. is where we type code
  33. a paragraph
  34. 1
  35. numbers
  36. <!DOCTYPE html>
  37. False
  38. True
  39. False
  40. https://example.com

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