← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 185 · 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.🖌️ What colour is behind the letters?
    h1 {
      text-align: center;
      background-color: red;
      font-size: 36px;
      color: blue;
    }
    (a) red (b) blue (c) purple
  2. 2.What does justify-content: center do? (a) equal gaps, none at ends (b) packs boxes at the end (c) packs boxes at the start (d) puts boxes in the middle
  3. 3.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  4. 4.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 14; i = i + 2) {
      console.log(i);
    }
  6. 6.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  8. 8.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) magenta (d) white
  9. 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
  10. 10.⚖️ What colour is the text of this element?
    <h1 class="box" id="intro">Hi</h1>
    CSS:
    h1 { color: green; }
    h1 { color: red; }
    (a) yellow (b) green (c) blue (d) red
  11. 11.⚡ What number does this code print?
    let a = 51;
    let b = 8;
    console.log(a + b);
  12. 12.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  13. 13.🌈 Which colour of light is strongest in rgb(88, 180, 133)? (a) green (b) blue (c) red
  14. 14.True or false: <li> lists things in any order. (a) True (b) False
  15. 15.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser asks it (b) the server sends files (c) DNS finds the server (d) the browser shows it
  16. 16.🔍 One closing tag is missing. Which one?
    <h1>Fun facts
    <i>Rain today</i>
    <h2>Good morning!</h2>
    (a) </i> (b) </p> (c) </h2> (d) </h1>
  17. 17.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  18. 18.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Litchi</td><td>Jamun</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  19. 19.Which of these is the content? (a) space outside the border (b) a solid or dotted edge (c) the text or picture (d) space inside the border
  20. 20.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) stores a website’s files (d) shows pages from the web
  21. 21.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
  22. 22.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 290px;
      padding: 5px;
      border: 2px solid black;
      margin: 20px;
    }
  23. 23.🎯 Which sign starts a class selector? (a) & (b) # (c) @ (d) .
  24. 24.🔁 What does this code print?
    let age = 2;
    if (age > 19) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  25. 25.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) : (d) -
  26. 26.True or false: the server sends the page back. (a) False (b) True
  27. 27.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  28. 28.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) About us (c) href (d) contact.html
  29. 29.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  30. 30.🌈 Which colour of light is strongest in rgb(126, 223, 85)? (a) green (b) red (c) blue
  31. 31.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  32. 32.🖌️ Which CSS property colours behind the text? (a) color (b) font-weight (c) font-family (d) background-color
  33. 33.True or false: in <img>, src tells which image to load. (a) False (b) True
  34. 34.Which of these does JavaScript do? (a) lays out the page (b) adds space around boxes (c) makes a form box (d) checks a quiz answer
  35. 35.🧩 Which language makes headings and lists? (a) CSS (b) JavaScript (c) HTML
  36. 36.🧭 Which semantic tag holds a news story? (a) <header> (b) <main> (c) <article> (d) <aside>
  37. 37.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
  38. 38.Which of these does HTML do? (a) changes the page live (b) shows a pop-up message (c) makes headings and lists (d) sets colours and fonts
  39. 39.Which of these does CSS do? (a) gives the page structure (b) counts down a timer (c) checks a quiz answer (d) sets colours and fonts
  40. 40.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>

Answer key

  1. red
  2. puts boxes in the middle
  3. 8
  4. an opening tag
  5. 12
  6. in the body
  7. <a href="about.html">
  8. cyan
  9. Yes
  10. red
  11. 59
  12. <
  13. green
  14. False
  15. DNS finds the server
  16. </h1>
  17. Yes
  18. 4
  19. the text or picture
  20. shows pages from the web
  21. a web server
  22. 344
  23. .
  24. child
  25. :
  26. True
  27. on the browser tab
  28. About us
  29. 7
  30. green
  31. False
  32. background-color
  33. True
  34. checks a quiz answer
  35. HTML
  36. <article>
  37. Language
  38. makes headings and lists
  39. sets colours and fonts
  40. <ul>

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