Screen 4

Games, exercises and tests to help you learn frontend web development

Test 1 - HTML, CSS & JS

Beginner

Choose the correct answer

HTML
q1. Which one of the following is valid html (only one)?
1.
2.
3.
4.
q2. Consider the following html: <span>some text</span> <span>some more text</span>
This html will produce text which appears:
1.
2.
q3. The following html tags - <ol> <li> - are used to create:
1.
2.
3.
4.
q4. What is the html tag to create a drop-down menu?
1.
2.
3.
4.
CSS
q5. Given the html below which of the CSS selectors will be used to select the span with the text '$5.00' (e.g. so you could make $5.00 red)?

<div>
    Strawberry ice cream: $10.00
    Chocolate ice-cream: <span>$5.00</span> (special offer)
</div>

CSS Selectors (choose:)
1.
2.
3.
4.
q6. Given the html below which of the CSS selectors will be used to set a style on the span with the word 'sale'?

<p>
     Come along now to the store in Main Street. We have a fantastic <span id="sale-text">sale</span> on
</p>

CSS Selectors (choose:)
1.
2.
3.
4.
q7. Given the html below which of the CSS selectors will be used to set a style on both buttons?

<div>
    <button class="call-to-action">Buy Now!</button>
    <button class="call-to-action">Request Brochure!</button>
</div>

CSS Selectors (choose:)
1.
2.
3.
4.
q8. Given the html below which of the CSS selectors will be used to set a style of just the first button?

<div>
    <button id="buyButton" class="call-to-action">Buy Now!</button>
    <button class="call-to-action">Request Brochure!</button>
</div>

CSS Selectors (choose:)
1.
2.
3.
4.
JavaScript
q9. What does document.getElementById() do?
1.
2.
3.
4.
q10. Which is the best definition of a function?
1.
2.
3.
4.