← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 483 · 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 true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) sends pages over the net (d) is where we type code
  2. 2.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <html> (b) <head>
  3. 3.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  4. 4.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) [ (d) {
  5. 5.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) Welcome! (d) My Hobbies
  6. 6.True or false: in <img>, src tells which image to load. (a) True (b) False
  7. 7.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) The red kite (d) Hello, world!
  8. 8.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Class 7 Blog (d) We won by 5 runs.
  10. 10.True or false: a code editor colours code to help us. (a) True (b) False
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  12. 12.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  14. 14.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) Visit the site (c) news.html (d) art.html
  15. 15.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
  16. 16.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
  17. 17.Which of these is an opening tag? (a) </li> (b) </b> (c) <li> (d) </h1>
  18. 18.Which of these is an opening tag? (a) <h1> (b) </p> (c) </h1> (d) </title>
  19. 19.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>My pets</p>
  20. 20.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) </i> (d) <i/>
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Cricket Club (c) My drawings (d) body
  22. 22.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  23. 23.True or false: <meta> has a closing tag. (a) False (b) True
  24. 24.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  25. 25.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets</h3>
    line 2: <small>Hello, world!
    line 3: <h2>Cricket is fun.</h2>
    (a) line 2 (b) line 3 (c) line 1
  27. 27.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  29. 29.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>I love mangoes.</h3>
    <h3>I love mangoes.</h3>
    <h2>Cricket is fun.</h2>
  30. 30.🔍 One closing tag is missing. Which one?
    <small>Rain today
    <strong>Hello, world!</strong>
    <h3>Cricket is fun.</h3>
    (a) </h1> (b) </strong> (c) </h3> (d) </small>
  31. 31.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a printer (d) a plain text editor
  32. 32.True or false: in <img>, height shows if the image fails. (a) False (b) True
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <p>Good morning!</p>
  34. 34.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) About us (b) Play games (c) art.html (d) href
  35. 35.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  36. 36.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  37. 37.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
  39. 39.True or false: <ol> goes inside ul or ol. (a) False (b) True
  40. 40.True or false: in <img>, alt sets how tall it is. (a) False (b) True

Answer key

  1. is where we type code
  2. <html>
  3. <li>
  4. <
  5. Welcome!
  6. True
  7. Hello, world!
  8. True
  9. Planets
  10. True
  11. Yes
  12. an opening tag
  13. <!DOCTYPE html>
  14. art.html
  15. 2
  16. </h2>
  17. <li>
  18. <h1>
  19. 3
  20. </i>
  21. My drawings
  22. <img>
  23. False
  24. a web server
  25. to leave notes
  26. line 2
  27. in the head
  28. src
  29. 4
  30. </small>
  31. a plain text editor
  32. False
  33. 1
  34. Play games
  35. 5
  36. in a new tab
  37. <a>
  38. 1
  39. False
  40. False

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