CSS Flashcards

1
Q

Abreaviation of CSS ?

A

Cascading Style Sheets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to define css inside an html document ?

A

style element is used

<style>
         body {
                   background-color : green ;
}
</style>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to import css file in HTML Document ?

A

We have to use link element to link external file to HTML document.

< link href=”stylesheet” rel=”stylesheet” />

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the general structure of css block in HTML Document ?

A

We have to use style element ?

<style>        
HTML Element Selecter {
                                css Property Name : value ;
}
</style>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the relation between parent element with Heading element regarding font size ?

A

Font size of heading element is pre defined, inheritance is not work in heading element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to select text color of a class ?

A

Basic Structure is :-
.className {
css-property-name : value
}

.first {
color:red;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to select by id ?

A

Basic Structure is :-

#id-name {
    css-property-name :value;
}
#your-name {
    background-color: red;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Short Hand property in CSS ?

A

Short Hand property of CSS means defining multiple values with one property .
Example-:

border : 5px solid #444
/*Here we have three values,border thickness, border style, & border color */
Border propertyt is not inherited.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to reset all property of all elements in HTML Document?

A

We have to use Star selector of CSS.

  • {
    margin:0;
    padding:0;
    box-sizing: border-box;
    }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to reset all CSS porperties of HTML Document ?

A

We have to use star selecter in CSS.

  • {
    margin:0;
    padding:0;
    box-sizing: border-box;
    }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Box Model ?

A

According to the box model,each and every element on a webpage can be seen as a rectangular box and each box, can have a width,a height, padding, margins and a border.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Content in Box ?

A

Contents are images ,text & any other information we want to publish .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Padding in Box ?

A

Padding is the transparent area around the content inside the box.
Padding means white-spaces, or spaces between contents inside the box

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Margin int the Box ?

A

Margin means spaces between boxes , they are white-spaces which are outside of the Box , in HTML Document.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Border in Box Model

A

Border is the outside line of the box which goes around the padding and the content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the Difference Between inline Elements & Block Elements ?

A

Block Elements create their own Line, but inline elements occupies the space as text they have

17
Q

Basic rule to add CSS to HTML ?

A

HTML Documents made up of Elements,thus CSS is applied to elements.

We have two methods to apply CSS :-

  1. Inside the HTML Document
  2. By importing CSS file in HTML doc.

Basic rule is select a element,class or id & apply CCS property to it.

18
Q

How to add CSS to multiple elements together ?

A

The method is , Specify multiple elements using list separator under curly braces give CSS property & its value.Now property is applied to both elements simultaneously

19
Q

How to apply CSS to an image ?

A

The best practice to style an image is , first add an identifier to image , beacuse we have multiple images in an HTML Document, by using identifier we can style multiple images indvidually.

20
Q

How to fix aspect ratio of an image ?

A

We have to use aspect ratio property of CSS.

aspect-ratio: auto