← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 865 · 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 JavaScript word writes in the console? (a) alert() (b) if (c) let (d) console.log()
  2. 2.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  3. 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  4. 4.🔁 What does this code print?
    let marks = 21;
    if (marks > 5) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  5. 5.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  7. 7.✍️ Which property is set to center in this rule?
    .note {
      text-align: center;
      border: 2px solid;
    }
    (a) text-align (b) center (c) background-color (d) margin
  8. 8.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  9. 9.Which of these is true of <main>? (a) sits at the bottom (b) holds a news story (c) holds the menu of links (d) is the page’s key part
  10. 10.🖌️ What colour are the letters?
    h1 {
      background-color: black;
      font-size: 28px;
      text-align: center;
      color: blue;
    }
    (a) white (b) black (c) blue
  11. 11.🔁 How many numbers does this code print?
    for (let i = 0; i < 12; i = i + 2) {
      console.log(i);
    }
  12. 12.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <h2>Our school trip</h2>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
  14. 14.🔢 When you open a web page, which comes first: “you type the URL” or “the browser shows it”? (a) the browser shows it (b) you type the URL
  15. 15.🎯 What kind of selector is p? (a) an id selector (b) a class selector (c) an element selector
  16. 16.💬 Does the browser show comments on the page? (a) Yes (b) No
  17. 17.True or false: a web browser opens web pages for us. (a) True (b) False
  18. 18.Which of these does JavaScript do? (a) sets colours and fonts (b) makes headings and lists (c) makes a form box (d) counts down a timer
  19. 19.True or false: <li> is an empty tag. (a) False (b) True
  20. 20.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  21. 21.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
  22. 22.📦 In the box model, which part is the text or picture? (a) padding (b) margin (c) border (d) content
  23. 23.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.Which of these has a closing tag? (a) <input> (b) <li> (c) <img> (d) <hr>
  25. 25.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) fort.jpg (b) kite.png (c) An old fort (d) tiger.jpg
  26. 26.🧩 Which language adds space around boxes? (a) JavaScript (b) HTML (c) CSS
  27. 27.🌈 Which colour is #ffffff? (a) bright green (b) black (c) blue (d) white
  28. 28.🧭 Who is helped most by semantic tags? (a) only the printer (b) only the server (c) nobody (d) screen-reader users
  29. 29.🖼️ 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 tiger asleep (c) tiger.jpg (d) A red kite
  30. 30.True or false: <ol> is one item of a list. (a) False (b) True
  31. 31.True or false: <nav> holds the logo and title. (a) True (b) False
  32. 32.📝 Which input type sends the form? (a) checkbox (b) submit (c) email (d) password
  33. 33.True or false: HTML rounds box corners. (a) True (b) False
  34. 34.⚖️ What colour is the text of this element?
    <h2 class="note" id="end">Hi</h2>
    CSS:
    .note { color: green; }
    .note { color: orange; }
    (a) green (b) red (c) orange (d) purple
  35. 35.🧭 Is <main> semantic or not semantic? (a) semantic (b) not semantic
  36. 36.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  37. 37.🌈 Which colour is #ff0000? (a) bright green (b) white (c) red (d) yellow
  38. 38.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  40. 40.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>

Answer key

  1. console.log()
  2. <ol>
  3. on the browser tab
  4. Pass
  5. </strong>
  6. <h6>
  7. text-align
  8. in a new tab
  9. is the page’s key part
  10. blue
  11. 6
  12. 2
  13. 150
  14. you type the URL
  15. an element selector
  16. No
  17. True
  18. counts down a timer
  19. False
  20. True
  21. a web server
  22. content
  23. in the body
  24. <li>
  25. fort.jpg
  26. CSS
  27. white
  28. screen-reader users
  29. A tiger asleep
  30. False
  31. False
  32. submit
  33. False
  34. orange
  35. semantic
  36. to leave notes
  37. red
  38. an opening tag
  39. <h1>
  40. <li>

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