← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 513 · 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.🔢 When you open a web page, which comes LAST? (a) you type the URL (b) DNS finds the server (c) the browser asks it (d) the browser shows it
  2. 2.🎯 Which CSS selector matches this element?
    <div class="red" id="logo">Hello</div>
    (a) span (b) #end (c) .box (d) #logo
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
  4. 4.🌍 Which one asks for a web page? (a) the server (b) the URL (c) HTTPS (d) the browser
  5. 5.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) </html>
  7. 7.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 130px;
      padding: 15px;
      border: 1px solid black;
      margin: 20px;
    }
  8. 8.⚖️ What colour is the text of this element?
    <p class="red" id="intro">Hi</p>
    CSS:
    .red { color: yellow; }
    #intro { color: orange; }
    (a) orange (b) white (c) green (d) yellow
  9. 9.⚡ What number does this code print?
    let a = 58;
    let b = 21;
    console.log(a - b);
  10. 10.✍️ What is the selector in this CSS rule?
    p {
      border: 2px solid;
      background-color: yellow;
      font-style: italic;
      text-align: center;
    }
    (a) border (b) .note (c) yellow (d) p
  11. 11.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  12. 12.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  14. 14.True or false: <input type="email"> is for an email address. (a) False (b) True
  15. 15.🔍 Which is the odd one out? (a) makes a link (b) changes the text size (c) adds space around boxes (d) rounds box corners
  16. 16.Which of these is true of a web browser? (a) saves our .html files (b) answers page requests (c) turns HTML into a page (d) shows line numbers
  17. 17.⚡ What number does this code print?
    let a = 40;
    let b = 25;
    console.log(a - b);
  18. 18.Which of these is a closing tag? (a) </title> (b) <body> (c) <title> (d) <b>
  19. 19.Which of these has a closing tag? (a) <hr> (b) <br> (c) <img> (d) <p>
  20. 20.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  21. 21.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
  22. 22.Which of these is true of <header>? (a) is the page’s key part (b) holds a news story (c) sits at the very top (d) holds extra side notes
  23. 23.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Jamun</td></tr>
    </table>
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 190px;
      padding: 25px;
      border: 5px solid black;
      margin: 15px;
    }
  25. 25.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 1;
    console.log(x + y);
    (a) 21 (b) Error (c) 3
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  27. 27.✍️ Which property is set to italic in this rule?
    li {
      font-style: italic;
      font-weight: bold;
    }
    (a) font-size (b) color (c) italic (d) font-style
  28. 28.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="number">
      <input type="email">
      <input type="checkbox">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  29. 29.What is <input type="checkbox"> for? (a) hides what you type (b) is for one line of words (c) lets you tick many (d) takes only numbers
  30. 30.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <h1>I love mangoes.
    <p>Hello, world!</p>
    (a) </p> (b) </h3> (c) </h1> (d) </em>
  31. 31.🌈 Which colour of light is strongest in rgb(188, 62, 56)? (a) blue (b) green (c) red
  32. 32.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  33. 33.Which of these is the border? (a) the gap round content (b) space inside the border (c) space outside the border (d) a solid or dotted edge
  34. 34.🧭 Which semantic tag holds extra side notes? (a) <aside> (b) <header> (c) <main> (d) <nav>
  35. 35.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a calculator (d) a music player
  37. 37.🖌️ What colour are the letters?
    p {
      font-size: 12px;
      background-color: blue;
      color: white;
      text-align: center;
    }
    (a) blue (b) white (c) red
  38. 38.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  39. 39.Which of these goes in the head? (a) <table> (b) <ul> (c) <title> (d) <h1>
  40. 40.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100

Answer key

  1. the browser shows it
  2. #logo
  3. 2
  4. the browser
  5. has a closing tag
  6. </html>
  7. 202
  8. orange
  9. 37
  10. p
  11. <ol>
  12. True
  13. A tiger asleep
  14. True
  15. makes a link
  16. turns HTML into a page
  17. 15
  18. </title>
  19. <p>
  20. No
  21. a web server
  22. sits at the very top
  23. 2
  24. 280
  25. 21
  26. 3
  27. font-style
  28. 6
  29. lets you tick many
  30. </h1>
  31. red
  32. 5
  33. a solid or dotted edge
  34. <aside>
  35. in the body
  36. a web browser
  37. white
  38. 3
  39. <title>
  40. 255

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