CSS Flashcards
Abreaviation of CSS ?
Cascading Style Sheets
How to define css inside an html document ?
style element is used
<style> body { background-color : green ; } </style>
How to import css file in HTML Document ?
We have to use link element to link external file to HTML document.
< link href=”stylesheet” rel=”stylesheet” />
What is the general structure of css block in HTML Document ?
We have to use style element ?
<style> HTML Element Selecter { css Property Name : value ; } </style>
What is the relation between parent element with Heading element regarding font size ?
Font size of heading element is pre defined, inheritance is not work in heading element.
How to select text color of a class ?
Basic Structure is :-
.className {
css-property-name : value
}
.first {
color:red;
}
How to select by id ?
Basic Structure is :-
#id-name { css-property-name :value; } #your-name { background-color: red; }
What is Short Hand property in CSS ?
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 to reset all property of all elements in HTML Document?
We have to use Star selector of CSS.
- {
margin:0;
padding:0;
box-sizing: border-box;
}
How to reset all CSS porperties of HTML Document ?
We have to use star selecter in CSS.
- {
margin:0;
padding:0;
box-sizing: border-box;
}
What is Box Model ?
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.
What is Content in Box ?
Contents are images ,text & any other information we want to publish .
What is Padding in Box ?
Padding is the transparent area around the content inside the box.
Padding means white-spaces, or spaces between contents inside the box
What is Margin int the Box ?
Margin means spaces between boxes , they are white-spaces which are outside of the Box , in HTML Document.
What is Border in Box Model
Border is the outside line of the box which goes around the padding and the content.