0% found this document useful (0 votes)
11 views

Digital Ca2 - Unlocked

something

Uploaded by

adele abdulgeniu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Digital Ca2 - Unlocked

something

Uploaded by

adele abdulgeniu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ّ ‫كلّيّة ال‬

AS-SUNNAH COLLEGE, ILORIN: ‫سنة‬


3, As-Sunnah Street, Off University Road, Tanke, Oke-Odo, Ilorin, Kwara State
THIRD TERM 2023/2024 ACADEMIC SESSION
First Continuous Assessment
NAME: _________________________________________________________ ADMISSION NO: ______________
SUBJECT: DIGITAL CLASS: Group B
TIME: 1 HOUR DATE: ______/________/_________
INSTRUCTION: ANSWER ALL QUESTIONS
SECTION A (OBJECTIVES)
1. Which attribute specifies the relationship between the current document and the linked stylesheet?
(A) `type` (B) `rel` (C) `href` (D) `src`
2. What is the correct syntax for linking an external CSS stylesheet in an HTML document?
(A) `<link src="styles.css">` (B) `<link type="text/css" href="styles.css">`
(C) `<link rel="stylesheet" href="styles.css">` (D) `<style src="styles.css">`
3. Which CSS property is used to specify the media type of the linked stylesheet?
(A) `media-type` (B) `type` (C) `media` (D) `stylesheet`
4. How can you link multiple CSS stylesheets to an HTML document?
(A) Using multiple `<link>` tags,
(B) Using a single `<link>` tag with multiple `href` attributes
(C) Using the `src` attribute within a `<style>` tag
(D) Using the src alones
5. Which attribute is used to specify the URL of the external CSS file?
(A) `url` (B) `src` (C) `path` (D) `href`
6. How do you apply inline styles to an HTML element?
(A) Using the `<style>` tag within the element (B) Using the `class` attribute with the desired styles
(C) Using the `style` attribute directly on the element(D) Using the `link` tag to link an external stylesheet
7. Which of the following is a disadvantage of inline styling?
(A) It allows for easy maintenance and updates
(B) It promotes separation of concerns
(C) It can clutter HTML code and reduce readability
(D) It improves website performance.
8. What is the highest priority in CSS specificity order?
(A) External styles (B) Internal styles (C) Inline styles (D) User agent styles
9. Which attribute is used to define inline styles in HTML?
(A) `css` (B) `style` (C) design (D) `format`
10. How can you override inline styles?
(A) By using `!important` in the external stylesheet
(B) By placing inline styles after external stylesheets
(C) By using higher specificity selectors in external or internal styles
(D) Inline styles cannot be overridden
11. Which element is used to link an external CSS file to an HTML document?
(A) `<style>` (B) `<link>` (C) `<css>` (D) `<script>`
12. What is the advantage of using external stylesheets?
(A) They are easy to apply to specific elements
(B) They improve website performance by reducing HTML file size
(C) They allow for better control over individual elements
(D) They promote separation of concerns and maintainability
13. How can you specify multiple external stylesheets for a single HTML document?
(A) By using multiple `<link>` tags with different `rel` attributes
(B) By linking each stylesheet within the `<style>` tag
(C) By using the `src` attribute within a `<style>` tag
(D) By including all styles within a single external CSS file
14. Which attribute is used to specify the URL of the external CSS file?
(A) `url` (B) `src` (C) `path` (D) `href`
15. What happens if the linked external stylesheet is not found or fails to load?
(A) The browser automatically applies default styles
(B) The HTML document displays an error message
(C) The browser tries to load an alternative stylesheet
(D) The HTML document remains unstyled
16. How do you include internal styles in an HTML document?
(A) By using the `<style>` tag within the `<head>` section
(B) By using the `style` attribute directly on the element
(C) By linking an external CSS file using the `<link>` tag
(D) By using the `class` attribute with predefined styles
17. What is the scope of internal styles?
(A) They apply only to the elements within the same document
(B) They apply to all elements on the webpage
(C) They apply to elements with matching class names
(D) They apply only to inline elements
18. Which selector is used to apply internal styles to specific HTML elements?
(A) .class` (B) #id (C) `*` (D) Element name
19. How can you combine internal styles with other types of styling?
(A) By using only internal styles for the entire webpage
(B) By using inline styles within elements
(C) By linking an external stylesheet and including internal styles within the `<style>` tag
(D) By applying internal styles to specific elements using their IDs
20. What is the advantage of internal styling over inline styling?
(A) Internal styling provides better performance
(B) Internal styling allows for easier maintenance and update
(C) Internal styling has higher specificity (D) none.
21. Which CSS property is used to control the spacing between lines of text?
(A) `padding` (B) `margin` (C) `line-height` (D) `font-size`
22. What does the CSS property `opacity` control?
(A) The transparency of an element (B) The size of an element
(C) The color of an element (D) The alignment of an element
23. Which CSS property is used to change the background color of an element?
(A) `color` (B) `background-color` (C) `border-color` (D) `text-color`
24. Which CSS property is used to add shadows to text?
(A) `box-shadow` (B) `text-shadow` (C) `shadow` (D) `font-shadow`
25. How can you apply the same styles to multiple selectors in CSS?
(A) By using the `all` keyword (B) By separating selectors with commas
(C) By nesting selectors within each other (D) By using the `multiple` attribute in the `<style>` tag
26. What is the benefit of using multiple selectors in CSS?
(A) It reduces code duplication and improves maintainability
(B) It increases specificity and overrides other styles
(C) It allows for more complex styling rules
(D) It improves browser compatibility
27. Which of the following is a valid example of using multiple selectors?
(A) `#header .logo .title` (B) `.header, .logo, .title` (C) `#header
(D) `#header .logo, .header .title`
28. How do you group multiple selectors under one style rule?
(A) By separating each selector with a space
(B) By using the `group` keyword
(C) By enclosing selectors in curly braces `{}` and separating them with commas
(D) By using the `group` attribute in the `<style>` tag.
29. What happens if conflicting styles are applied to the same element using multiple selectors?
(A) The browser applies styles based on specificity and the cascade
(B) The styles are randomly applied
(C) The browser ignores conflicting styles
(D) The styles are applied in alphabetical order
30. What is a CSS rule?
(A) A combination of selectors and declarations (B) A specific set of styles applied to an element
(C) A CSS property used for text decoration (D) A way to link HTML and CSS files
31. What is the purpose of a CSS rule?
(A) To define the structure of an HTML document (B) To specify how HTML elements should be styled
(C) To create animations and transitions (D) To link external resources to an HTML document
32. How is a CSS rule typically structured?
(A) Selector followed by properties (B) Selector followed by values
(C) Properties followed by selector (D) Selector followed by declarations
33. Which part of a CSS rule determines which elements the styles will be applied to?
(A) Selector (B) Property (C) Value (D) Declaration
34. What does the CSS selector `h1.intro` target?
(A) All `<h1>` elements
(B) All elements with the class `intro`
(C) All `<h1>` elements inside an element with the class `intro`
(D) All elements with the ID `intro` inside an `<h1>` element
35. How can you target all elements of a specific type in CSS?
(A) By using the `.` symbol followed by the element type
(B) By using the `#` symbol followed by the element type
(C) By using the element type directly
(D) By using the `*` symbol followed by the element type
36. Which CSS selector is used to target elements with a specific class?
(A) `#` (B) `.` (C) `:` (D) `*`
37. What is a CSS declaration?
(A) A rule that defines how HTML elements are styled (B) A combination of selectors and properties
(C) A property-value pair that defines a style rule (D) A way to group related styles together
38. The “list-style-type” has how many types?
(A) 4 (B) 6 (C) 8 (D) 3
39. The “list-style-image” is used for ________
(A) Uploading image as bullet (B) changing style to disc (C) changing style to numbering
(D) none of the above.
40. CSS has how many stylings?
(A) 4 (B) 6 (C) 8 (D) 3

SECTION B (THEORY)
INSTRUCTION: ANSWER ANY TWO (2) QUESTIONS.
Question 1
a) Create a folder with your name on the desktop, write a code that will display as shown below.
b) Save your code output in the folder.
Question 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="text" href="P.ABC">
</head>
<body>
<p id="ade" class="from">< i want to be the best programmer in the world! /p>

</body>
<h1 class="pp">if you want a world to celebrate you then you need to celebrte yourself.</h1>
</html>

Copy the code above into your compiler (Vscode, Notepad++ or Notepad)
(a) Correct all the errors in this coding and make it run accordingly.
(b) Attach CSS of Fish.css in it.
(c) Write your own <h2> element that will display your name with the words “I made it” e.g I, Kabir yahya
made it.
Question 3
Draw table using HTML that will consist of five list: Banana, Orange, Apple, Avocado and pineapple.
(a) Change the bullet to (i) disc (ii) roman
(b) Write a “list-style-image” to your image or any available image on your PC.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy