← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 626 · 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 attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
  2. 2.True or false: the border is space inside the border. (a) False (b) True
  3. 3.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
  5. 5.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  6. 6.🎯 Which element does the selector #intro style? (a) <h1 id="main"> (b) <h1 class="intro"> (c) <h1 id="intro"> (d) <h2 class="menu">
  7. 7.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  8. 8.🌈 Which colour is #ffffff? (a) magenta (b) bright green (c) white (d) cyan
  9. 9.Which of these does CSS do? (a) makes a link (b) gives the page structure (c) puts a picture on a page (d) rounds box corners
  10. 10.🎨 What does CSS stand for? (a) Creative Sheet System (b) Colourful Site Styles (c) Computer Style Sheets (d) Cascading Style Sheets
  11. 11.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) never changes (d) fits every screen
  12. 12.⚡ What does JavaScript add to a web page? (a) the domain name (b) the page title (c) only colours (d) actions and changes
  13. 13.✍️ Which sign goes between a property and its value? (a) - (b) : (c) ; (d) =
  14. 14.🔁 Which word runs code only when something is true? (a) let (b) if (c) log (d) for
  15. 15.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  16. 16.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) script.js (c) style.css
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  18. 18.🔍 One closing tag is missing. Which one?
    <p>I love mangoes.
    <h3>Hello, world!</h3>
    <u>Fun facts</u>
    (a) </p> (b) </u> (c) </h3> (d) </i>
  19. 19.⚖️ What colour is the text of this element?
    <h2 class="red" id="hero">Hi</h2>
    CSS:
    h2 { color: white; }
    h2 { color: black; }
    (a) white (b) green (c) orange (d) black
  20. 20.🔢 When you open a web page, which comes FIRST? (a) DNS finds the server (b) the browser shows it (c) the browser asks it (d) you type the URL
  21. 21.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) . (d) ;
  22. 22.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  23. 23.⚖️ What colour is the text of this element?
    <p class="box" id="logo">Hi</p>
    CSS:
    #logo { color: black; }
    #logo { color: red; }
    (a) yellow (b) red (c) black (d) white
  24. 24.📋 What number does the browser show next to “Papaya”?
    <ol start="8">
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  25. 25.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
  26. 26.🎯 Which element does the selector li style? (a) <div> (b) <p id="main"> (c) <li class="menu"> (d) <span class="menu">
  27. 27.True or false: <input type="email"> is for an email address. (a) True (b) False
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
  29. 29.🔁 How many numbers does this code print?
    for (let i = 0; i < 15; i = i + 2) {
      console.log(i);
    }
  30. 30.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  31. 31.True or false: <br> is an empty tag. (a) False (b) True
  32. 32.🖌️ Which CSS property sets the letter colour? (a) color (b) background-color (c) font-weight (d) text-align
  33. 33.Which of these is an empty tag? (a) <p> (b) <h1> (c) <br> (d) <b>
  34. 34.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  35. 35.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  36. 36.What does justify-content: center 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
  37. 37.🎯 Which CSS selector matches this element?
    <span class="menu" id="top">Hello</span>
    (a) p (b) .top (c) #intro (d) .menu
  38. 38.True or false: .big is a class selector. (a) False (b) True
  39. 39.⚡ A JavaScript file usually ends with which extension? (a) .jpg (b) .js (c) .html (d) .css
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Kites fly high<br>Birds sing<br>Stars shine</p>

Answer key

  1. height
  2. False
  3. in the head
  4. True
  5. 60
  6. <h1 id="intro">
  7. an id selector
  8. white
  9. rounds box corners
  10. Cascading Style Sheets
  11. fits every screen
  12. actions and changes
  13. :
  14. if
  15. Yes
  16. index.html
  17. A tiger asleep
  18. </p>
  19. black
  20. you type the URL
  21. ;
  22. No
  23. red
  24. 10
  25. starts a new line
  26. <li class="menu">
  27. True
  28. 2
  29. 8
  30. True
  31. True
  32. color
  33. <br>
  34. on the browser tab
  35. <ul>
  36. puts boxes in the middle
  37. .menu
  38. True
  39. .js
  40. 5

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