← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 862 · 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 text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Our school trip</p>
    (a) The red kite (b) Our school trip (c) Rain today
  2. 2.Which of these is true of a web server? (a) answers page requests (b) colours code to help us (c) saves our .html files (d) opens web pages for us
  3. 3.True or false: body { margin: 0; } goes in style.css. (a) True (b) False
  4. 4.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  5. 5.True or false: in <img>, width sets how wide it is. (a) False (b) True
  6. 6.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  7. 7.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  8. 8.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.🌈 Which hex code is white? (a) #00ffff (b) #0000ff (c) #ffff00 (d) #ffffff
  10. 10.⚖️ What colour is the text of this element?
    <p class="red" id="intro">Hi</p>
    CSS:
    .red { color: yellow; }
    p { color: orange; }
    (a) yellow (b) green (c) orange (d) white
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  12. 12.🌍 What is the path in this URL?
    http://www.example.com/news/today.html
    (a) www.example.com (b) http (c) /games/chess.html (d) /news/today.html
  13. 13.🌍 What is the protocol in this URL?
    https://learn.example.com/index.html
    (a) learn.example.com (b) https (c) /index.html (d) http
  14. 14.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
  15. 15.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  16. 16.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h5>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
  17. 17.True or false: <input type="submit"> lets you pick only one. (a) False (b) True
  18. 18.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) - (d) :
  19. 19.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) else (d) let
  20. 20.Which of these is safe to do online? (a) share your OTP (b) share your password (c) post your home address (d) use a nickname in games
  21. 21.What does justify-content: space-between do? (a) packs boxes at the end (b) packs boxes at the start (c) puts boxes in the middle (d) equal gaps, none at ends
  22. 22.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <p>My best friend</p>
    <p>Good morning!</p>
  23. 23.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
  24. 24.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 60px;
      padding: 30px;
      border: 3px solid black;
      margin: 20px;
    }
  25. 25.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <u>My pets
    line 3: <strong>Hello, world!</strong>
    (a) line 2 (b) line 1 (c) line 3
  27. 27.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 8;
    }
    console.log(total);
  29. 29.True or false: a web server sends pages over the net. (a) False (b) True
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  32. 32.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 360px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  33. 33.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
  34. 34.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  35. 35.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
  36. 36.⚖️ What colour is the text of this element?
    <h1 class="star" id="logo">Hi</h1>
    CSS:
    .star { color: red; }
    h1 { color: yellow; }
    (a) yellow (b) black (c) green (d) red
  37. 37.⚖️ What colour is the text of this element?
    <p class="menu" id="end">Hi</p>
    CSS:
    p { color: yellow; }
    p { color: white; }
    (a) green (b) blue (c) yellow (d) white
  38. 38.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) saves our .html files
  39. 39.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  40. 40.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>

Answer key

  1. The red kite
  2. answers page requests
  3. True
  4. href
  5. True
  6. 2
  7. an element selector
  8. in the head
  9. #ffffff
  10. yellow
  11. 50
  12. /news/today.html
  13. https
  14. the body
  15. <a href="about.html">
  16. <h6>
  17. False
  18. :
  19. for
  20. use a nickname in games
  21. equal gaps, none at ends
  22. 5
  23. height
  24. 166
  25. in the head
  26. line 2
  27. an opening tag
  28. 64
  29. True
  30. 350
  31. <h6>
  32. 60
  33. makes it harder
  34. a code editor
  35. CSS
  36. red
  37. white
  38. saves our .html files
  39. No
  40. <ul>

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