← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 819 · 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.🌍 Which one sends the page back? (a) the URL (b) the browser (c) the server (d) HTTPS
  2. 2.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 230px;
      padding: 5px;
      border: 4px solid black;
      margin: 15px;
    }
  3. 3.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
  4. 4.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  5. 5.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Machine (d) Mouse
  6. 6.🔁 Which word runs code only when something is true? (a) let (b) log (c) for (d) if
  7. 7.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) is where we type code (d) colours code to help us
  8. 8.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) news.html (b) href (c) About us (d) Play games
  9. 9.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h5>
    (a) Yes (b) No
  10. 10.Which of these is safe to do online? (a) click prize links (b) check for https first (c) share your password (d) download from pop-ups
  11. 11.⚖️ What colour is the text of this element?
    <p class="note" id="logo">Hi</p>
    CSS:
    .note { color: green; }
    #logo { color: purple; }
    (a) purple (b) green (c) white (d) blue
  12. 12.True or false: <table> holds the whole table. (a) True (b) False
  13. 13.📝 How many <input> tags are in this form?
    <form>
      <input type="email">
      <input type="text">
      <input type="number">
      <input type="submit" value="Send">
    </form>
  14. 14.🌈 Which colour of light is strongest in rgb(71, 133, 173)? (a) red (b) green (c) blue
  15. 15.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <i>Fun facts</i>
    <h1>I love mangoes.</h1>
    (a) </i> (b) </h1> (c) </strong> (d) </h3>
  16. 16.🔢 To build and share your first web page, which comes FIRST? (a) test in a browser (b) write the HTML (c) plan what to show (d) add CSS styles
  17. 17.🎯 Which CSS selector matches this element?
    <p class="big" id="top">Hello</p>
    (a) .top (b) #big (c) #top (d) .red
  18. 18.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) helps everyone (b) makes it harder
  19. 19.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
  20. 20.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  21. 21.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width
  23. 23.🖌️ What colour is behind the letters?
    h2 {
      font-size: 20px;
      color: green;
      text-align: left;
      background-color: red;
    }
    (a) green (b) red (c) blue
  24. 24.🔍 One closing tag is missing. Which one?
    <strong>My pets</strong>
    <p>Rain today
    <em>Good morning!</em>
    (a) </em> (b) </u> (c) </strong> (d) </p>
  25. 25.Which of these does HTML do? (a) reacts to a button click (b) makes headings and lists (c) checks a quiz answer (d) adds space around boxes
  26. 26.🔁 What does this code print?
    let score = 36;
    if (score < 38) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  27. 27.🧭 Which semantic tag holds the logo and title? (a) <aside> (b) <footer> (c) <header> (d) <nav>
  28. 28.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  29. 29.✍️ Which sign ends each CSS declaration? (a) ; (b) : (c) . (d) ,
  30. 30.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Orange</td><td>Orange</td><td>Jamun</td></tr>
    </table>
  31. 31.🔁 How many times does this code print “Well done”?
    for (let i = 1; i < 10; i++) {
      console.log("Well done");
    }
  32. 32.🎯 What kind of selector is body? (a) an id selector (b) a class selector (c) an element selector
  33. 33.📊 Which tag holds the whole table? (a) <th> (b) <td> (c) <tr> (d) <table>
  34. 34.Which of these is a weak password? (a) abcd1234 (b) S0lar!Pen#8 (c) Kite_Fl1es@Dawn (d) Chai$Cup_19x
  35. 35.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  36. 36.🧭 Why use <nav> instead of <div> for a menu? (a) it loads faster (b) it tells its meaning (c) it adds pictures (d) it makes text red
  37. 37.True or false: “link text “click here”” makes the page harder to use. (a) True (b) False
  38. 38.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 32px;
      }
    }
  39. 39.💪 Which justify-content value puts boxes in the middle? (a) center (b) flex-end (c) flex-start (d) space-between
  40. 40.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server

Answer key

  1. the server
  2. 248
  3. 2
  4. <!DOCTYPE html>
  5. Markup
  6. if
  7. shows pages from the web
  8. Play games
  9. No
  10. check for https first
  11. purple
  12. True
  13. 4
  14. blue
  15. </h3>
  16. plan what to show
  17. #top
  18. makes it harder
  19. 2
  20. Yes
  21. in the body
  22. An old fort
  23. red
  24. </p>
  25. makes headings and lists
  26. You win
  27. <header>
  28. <h1>
  29. ;
  30. 3
  31. 9
  32. an element selector
  33. <table>
  34. abcd1234
  35. 3
  36. it tells its meaning
  37. True
  38. 24
  39. center
  40. a web browser

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