1. Grace is learning about CSS selectors. She wants to apply a style only to an element with id 'main-header'. Which CSS selector should she use?
Reading mode
Unit 3: Programming Fundamentals
Correct answer is shown on each question. Use Next to read one by one.
2. Diana is working with HTML lists. She wants to create a list where each item has a bullet point. Which list type should she use?
3. Iman is creating a webpage with a list of items. She wants the list to be numbered. Which HTML tag should Iman use to create an ordered list?
4. Which HTML attribute is used to define inline styles in a single element?
5. Which HTML tag is used to create a form?
6. In JavaScript, which statement is used to declare a variable?
7. What is the correct HTML for referring to an external script called 'script.js'?
8. Lara is learning about CSS box model. She wants to know the space between the element and other elements. Which part of the box model is that?
9. Usman is learning about JavaScript events. He wants to run a function when a user clicks a button. Which event should he use?
10. Priya is working on a website and wants to change the color of all links when the mouse hovers over them. Which CSS pseudo-class should she use?
11. Which language is mainly used to create web pages?
12. Which JavaScript statement is used for decision making?
13. Where in an HTML document is the correct place to refer to an external style sheet?
14. Hina is writing JavaScript. She wants to convert a string '123' into a number. Which function should she use?
15. What type of error occurs when a program runs without crashing but does not produce the expected or correct result?
16. Which symbol is used to select an id in CSS?
17. Aisha is creating a link that opens in a new tab. She knows she needs to add an attribute to the <a> tag. Which attribute should she use?
18. Nora is building a website. She wants to add a dropdown list of countries. Which HTML element should she use?
19. Kofi is creating a table. He wants a cell to span two columns. Which attribute should he use?
20. How do you select an element with the id 'header' in CSS?