CSS Questions and Answers Latest 2022
CSS ✔✔Cascading Style Sheets control the appearance and placement of HTML elements on a
page.
selector ✔✔The part of a CSS rule which specifies which element(s) are to be styl
...
CSS Questions and Answers Latest 2022
CSS ✔✔Cascading Style Sheets control the appearance and placement of HTML elements on a
page.
selector ✔✔The part of a CSS rule which specifies which element(s) are to be styled.
declaration ✔✔Property name and value separated by a colon and terminated with a semicolon,
for example... Font-family: sans serif;
property ✔✔The part of a CSS rule which specifies WHICH TYPE of modification to apply to
HTML elements.
value ✔✔The part of the CSS rule which specifies HOW the property/attribute will be modified
ID Selector ✔✔A selector that identifies only ONE element within an HTML document. Preceded
by a # sign.
Class Selector ✔✔A selector that applies the same attribute to MULTIPLE HTML elements that
reference it. Preceded by a . (period).
Syntax ✔✔Arrangement of words and symbols in a language.
Inline CSS Style ✔✔CSS coded IN THE BODY of the HTML code as a STYLE ATTRIBUTE
in an HTML tag. Limited to styling one element at a time.
Internal CSS Style ✔✔CSS coded in the HEAD of the HTML code inside of tags.
Limited to that one HTML page. (also known as embedded)
External Style Sheet ✔✔CSS coded in a SEPARATE CSS FILE that controls the formatting of
elements on any web page that links to the .css file.
Rule ✔✔A complete CSS style statement: selector, property, and value.
Properties REQUIRED to make a border ✔✔Style is required (width and color are optional)
Property used to change the color of text ✔✔Color
Property used to fill a div or change the color behind your content ✔✔Background-color
Property used to make your text italic ✔✔font-style
Property used to make your text have Small Caps ✔✔font-variant
Property used to make your text bold ✔✔font-weight
Property used to make your text bigger/smaller ✔✔font-size
Property used to select the style/type of your font ✔✔font-family
Serif ✔✔Font-family with decorative edges
Sans-Serif ✔✔Font-family without decorative edges
Margin ✔✔The space around an element, separating it from other elements
Padding ✔✔The space inside of an element, separating its contents from its outer edge
Declaration used to add an image to the back of a element. ✔✔background-image: url("paper.gif");
Practice: To the h1 in class jumbotron: Set the font-family to 'Open Sans', sans-serif in h1 and the
text color to red ✔✔Practice:
.jumbotron h1 {
color: red;
font-family: 'Open Sans', sans-serif;
}
Practice: To the class jumbotron: Set the background to red ✔✔Practice:
.jumbotron {
background-color: red;
}
Practice: To the element panelA: Change the background image of panelA in a webpage to
url('https://goo.gl/ODpi3y') ✔✔Practice:
panelA {
background-image: url('https://goo.gl/ODpi3y');
}
Practice: To the element panelA: Set the background color to red ✔✔Practice:
panelA {
background-color: red;
}
Practice: To the H1 inside of the element panelA: Set the border width to 10 px but override the
bottom width to 3px ✔✔Practice:
panelA h1 {
border-style: solid;
border-width: 10px;
border-bottom-width: 3px;
[Show More]