← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 558 · 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.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
  2. 2.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  3. 3.True or false: <h1> has a closing tag. (a) True (b) False
  4. 4.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  5. 5.🔍 One closing tag is missing. Which one?
    <h3>The red kite</h3>
    <h2>I love mangoes.
    <h1>Fun facts</h1>
    (a) </strong> (b) </h1> (c) </h3> (d) </h2>
  6. 6.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Class 7 Blog (c) Welcome! (d) Thanks for visiting.
  8. 8.True or false: <li> lists steps in order. (a) False (b) True
  9. 9.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) Our school trip (b) Fun facts (c) The red kite
  10. 10.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <body> (c) <!DOCTYPE html> (d) </html>
  11. 11.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a microphone (d) a printer
  12. 12.Which of these is true of a web server? (a) colours code to help us (b) has an address bar (c) sends pages over the net (d) opens web pages for us
  13. 13.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  14. 14.True or false: HTML on its own can run a game loop. (a) True (b) False
  15. 15.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  16. 16.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </html> (b) </head>
  17. 17.🔗 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>
  18. 18.True or false: in <img>, src describes the picture. (a) True (b) False
  19. 19.True or false: in <img>, src tells which image to load. (a) False (b) True
  20. 20.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Here is my best one. (d) My drawings
  22. 22.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Good morning! (b) Cricket is fun. (c) Hello, world! (d) I love mangoes.
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Birds sing<br>Sky is blue</p>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
  26. 26.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) news.html (b) art.html (c) Maths fun (d) maths.html
  27. 27.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.True or false: <style> goes in the body. (a) True (b) False
  29. 29.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  30. 30.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  31. 31.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) Art corner (b) Maths fun (c) games.html (d) href
  32. 32.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <i>Our school trip
    <u>I love mangoes.</u>
    (a) </h2> (b) </b> (c) </i> (d) </u>
  33. 33.🔠 Are headings shown in bold by default? (a) No (b) Yes
  34. 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  35. 35.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  36. 36.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) href (c) School news (d) games.html
  37. 37.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  38. 38.Which of these goes in the head? (a) <img> (b) <a> (c) <link rel="stylesheet"> (d) <h1>
  39. 39.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  40. 40.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>

Answer key

  1. <head>
  2. a code editor
  3. True
  4. a slash /
  5. </h2>
  6. HyperText
  7. Welcome!
  8. False
  9. Our school trip
  10. </html>
  11. a plain text editor
  12. sends pages over the net
  13. on the browser tab
  14. False
  15. to leave notes
  16. </head>
  17. <a href="about.html">
  18. False
  19. True
  20. <ul>
  21. Riya’s Recipes
  22. in the body
  23. Good morning!
  24. 4
  25. 2
  26. maths.html
  27. a closing tag
  28. False
  29. Yes
  30. <h1>
  31. Maths fun
  32. </i>
  33. Yes
  34. <ol>
  35. a code editor
  36. Art corner
  37. <!DOCTYPE html>
  38. <link rel="stylesheet">
  39. 2
  40. <ul>

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