For Quiz Preparation for TGES ,Go to General Knowledge Section

Thursday, August 28

Computer class-6 ch-4 (Introduction to CSS)

 Chapter 4: Introduction to CSS

Exercises (Pgs. 60-62)

A. Tick (✓) the correct answers.

1. a

2. c

3. c

4. c

5. c

B. Fill in the blanks.

1. World Wide Web Consortium

2. background-image

3. text-align

4. element

5. text-indent

C. Write T for True and F for False.

1. T

2. F

3. T

4. T

5. F

D. Answer the following questions.

Q.1    What is CSS ? Why is it important ? 

Ans:-    CSS stands for Cascading Style Sheets. It was introduced by the World Wide Web Consortium (W3C) to improve the presentation of web pages. CSS enables the separation of the content of a web page from its layout, allowing for more flexible and efficient design. CSS is a set of rules that controls how elements on a web page look. It focuses on the style and design of the content. With CSS, you can change the appearance of many pages on a website using just one style sheet, making the code shorter and easier to manage.

Q.2    Describe the three methods of applying CSS.

Ans:-    CSS can be applied to a document in three distinct ways.

External style: This method is used when styles need to be applied to multiple web pages or an entire website, and it involves creating a separate CSS file.

Internal style: This method is used when you want to apply effects to a specific web page. It is added to the head element of the page by writing the code within the <style>...</style> tag.

Inline style: It is used when you want to apply a specific style to an individual element on a web page. To add inline style, you must include the style attribute in the desired element.


Q.3    Explain  the significance of background properties in CSS.

Ans:-    Background properties in CSS are used to set the background of an element. These properties help style the visual appearance and enhance the design of web pages. Some important background properties are:

• background-color: 

• background-image:  

• background-repeat:  

• background-position:  

• background-size:  

Q.4    Explain any two margin properties in CSS.  

Ans:-    Margin properties in CSS are used to create space around elements, outside of their borders. Two common margin properties are:

• margin-top:

Defines the space above an element.

Example: margin-top: 20px;

• margin-right:

Defines the space to the right of an element.

Example: margin-right: 10px;


Q.5    Explain the syntax to write a style rule. Explain the terms selector , Property and value. 

Ans:- The basic syntax of a CSS style rule is:

selector {

property: value;

}

Selector: The element or group of elements that you want to style (e.g., p, div, .class-name, #id-name).

Property: The specific style you want to apply to the selected element (e.g., color, font-size, margin).

Value: The value that you assign to the property (e.g., red, 12px, 10%)

Example of a CSS rule:

h1 {

color: blue;

font-size: 24px;

}

Here, h1 is the selector, color and font-size are properties, and blue and 24px are the values.

No comments:
Write Comments

Please ask any question about gk related

Total Pageviews

Popular Posts

© 2014 SSC GK.in . Designed by Bloggertheme9 | Distributed By Gooyaabi Templates
Powered by Blogger.