← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 617 · 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="bus.jpg" alt="Our school bus" width="150">
    (a) bus.jpg (b) Our school bus (c) width (d) An old fort
  2. 2.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  3. 3.True or false: <input> has a closing tag. (a) False (b) True
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
  6. 6.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  7. 7.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <h4>My pets</h4>
    <p>I love mangoes.</p>
  8. 8.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  9. 9.Which of these is an opening tag? (a) </title> (b) </li> (c) </p> (d) <p>
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  11. 11.Which of these is true of a web server? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) saves our .html files
  12. 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  14. 14.🔍 Which is the odd one out? (a) sends pages over the net (b) saves our .html files (c) stores a website’s files (d) answers page requests
  15. 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Kites fly high</p>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) href (c) Maths fun (d) Visit the site
  19. 19.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  20. 20.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  21. 21.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  22. 22.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  23. 23.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  24. 24.True or false: a web browser opens web pages for us. (a) True (b) False
  25. 25.🔍 One closing tag is missing. Which one?
    <b>My best friend</b>
    <h3>Cricket is fun.</h3>
    <h1>Our school trip
    (a) </b> (b) </h1> (c) </h3> (d) </i>
  26. 26.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  27. 27.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
  28. 28.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  29. 29.Which of these is a closing tag? (a) <h1> (b) <b> (c) </li> (d) <body>
  30. 30.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  31. 31.Which of these is an empty tag? (a) <p> (b) <ul> (c) <li> (d) <input>
  32. 32.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) Cricket Club (d) I like to read.
  34. 34.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  36. 36.True or false: in <img>, src describes the picture. (a) False (b) True
  37. 37.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  38. 38.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <h4>The red kite</h4>
  39. 39.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) news.html (b) quiz.html (c) games.html (d) Art corner
  40. 40.Which of these is an empty tag? (a) <h1> (b) <p> (c) <title> (d) <img>

Answer key

  1. Our school bus
  2. width
  3. False
  4. bullets
  5. 2
  6. <li>
  7. 3
  8. <h6>
  9. <p>
  10. <h1>
  11. stores a website’s files
  12. has a closing tag
  13. a web browser
  14. saves our .html files
  15. an opening tag
  16. 3
  17. 3
  18. Visit the site
  19. <ul>
  20. in a new tab
  21. opens it in a new tab
  22. starts a new line
  23. the body
  24. True
  25. </h1>
  26. Yes
  27. as one space
  28. <a href="about.html">
  29. </li>
  30. 1
  31. <input>
  32. <h1>
  33. Welcome!
  34. to leave notes
  35. 3
  36. False
  37. numbers
  38. 3
  39. news.html
  40. <img>

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