← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 498 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
  2. 2.⚖️ What colour is the text of this element?
    <p class="star" id="logo">Hi</p>
    CSS:
    .star { color: black; }
    p { color: red; }
    (a) black (b) red (c) yellow (d) orange
  3. 3.True or false: to type a password on http is not safe. (a) False (b) True
  4. 4.🌍 What is the protocol in this URL?
    https://kids.example.org/news/today.html
    (a) /news/today.html (b) http (c) kids.example.org (d) https
  5. 5.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) Contact us (c) About us (d) contact.html
  6. 6.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 130px;
      padding: 20px;
      border: 4px solid black;
      margin: 5px;
    }
  7. 7.⚖️ What colour is the text of this element?
    <p class="big" id="intro">Hi</p>
    CSS:
    p { color: yellow; }
    #intro { color: orange; }
    .big { color: blue; }
    (a) orange (b) yellow (c) blue (d) green
  8. 8.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  9. 9.True or false: in <img>, width names the picture file. (a) False (b) True
  10. 10.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) quiz.html (c) Art corner (d) about.html
  12. 12.Which of these goes in the head? (a) <table> (b) <a> (c) <meta charset="utf-8"> (d) <h1>
  13. 13.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it adds pictures (c) it tells its meaning (d) it loads faster
  14. 14.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
  15. 15.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) display: flex (c) align-items (d) justify-content
  16. 16.True or false: .note is an element selector. (a) True (b) False
  17. 17.Which of these has a closing tag? (a) <p> (b) <img> (c) <input> (d) <meta>
  18. 18.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <script> (c) <code> (d) <style>
  19. 19.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </html> (c) <html> (d) <body>
  20. 20.🧭 Which semantic tag holds the logo and title? (a) <aside> (b) <nav> (c) <main> (d) <header>
  21. 21.⚡ A JavaScript file usually ends with which extension? (a) .css (b) .jpg (c) .html (d) .js
  22. 22.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  23. 23.True or false: <footer> holds extra side notes. (a) False (b) True
  24. 24.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  25. 25.📋 What number does the browser show next to “Mango”?
    <ol start="4">
      <li>Grapes</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  26. 26.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
  27. 27.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Cricket
    </form>
  28. 28.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  29. 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  30. 30.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) blue (c) red (d) black
  31. 31.True or false: <tr> makes a heading cell. (a) False (b) True
  32. 32.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  34. 34.🌈 Which colour is #ffff00? (a) red (b) yellow (c) cyan (d) magenta
  35. 35.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  36. 36.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<footer>”? (a) <footer> (b) <main>
  37. 37.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the end (c) puts boxes in the middle (d) packs boxes at the start
  38. 38.📝 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 one space (d) as a new line
  39. 39.What is <input type="radio"> for? (a) lets you pick only one (b) picks a day (c) hides what you type (d) is for one line of words
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!
    line 2: <strong>My best friend</strong>
    line 3: <em>Cricket is fun.</em>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. the later one
  2. black
  3. True
  4. https
  5. About us
  6. 178
  7. orange
  8. <a>
  9. False
  10. a closing tag
  11. quiz.html
  12. <meta charset="utf-8">
  13. it tells its meaning
  14. semantic
  15. align-items
  16. False
  17. <p>
  18. <script>
  19. <!DOCTYPE html>
  20. <header>
  21. .js
  22. an attribute
  23. False
  24. makes it harder
  25. 5
  26. <h5>
  27. 1
  28. <h1>
  29. <ol>
  30. black
  31. False
  32. easy to read
  33. 200
  34. yellow
  35. <ol>
  36. <main>
  37. packs boxes at the start
  38. as one space
  39. lets you pick only one
  40. line 1

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