-
What does CSS stand for and what does it describe?
It stands for Cascading Style Sheets and describes how HTML elements should be displayed.
-
What are the two parts of a CSS rule?
a selector and a declaration block
-
What does a selector do?
points to the HTML element you want to style
-
What are the two parts of a CSS declaration and what are they separated by?
Each CSS declaration has a CSS property name and a value, separated by a colon.
-
What does a CSS declaration always end with?
a semicolon
-
Declaration blocks are surrounded by what?
curly braces
-
What does an element selector do?
selects HTMl elements based on the element name
-
What does an id selector do?
uses the id attribute of an HTML element to select a specific element
-
Which character do id selectors begin with in CSS?
hash (#) character
-
Which character do class selectors begin with in CSS?
period (.) character
-
How do you group CSS selectors?
separate each selector with a comma
-
Type your name in a CSS comment.
/*Vivian Ngo*/
-
What are the three ways to insert CSS?
external CSS, internal CSS, inline CSS
-
Which method of CSS insertion lets you change the look of an entire website by changing just one file?
external CSS
-
Which HTML element directs the page to a style sheet?
<style> element
-
If some properties have been defined for the same selector (element) in different rules, which will the browser use?
the value from the last read style sheet will be used
-
Type the formula for specifying an RGB value.
rgb(red,green,blue)
-
Which method of specifying color uses a hash tag and values between 00 and ff for RGB?
HEX value
-
RGBA color values are an extension of RGB color values with an alpha channel—what does an alpha channel specify?
opacity for a color
-
Which property specifies an image to use as the background of an element?
background-image property
-
What does it mean when a background image is fixed?
It will not scroll with the page.
-
The CSS border properties allow you to specify which three aspects of an element’s border?
border width, style, and color
-
Which property adds rounded borders to an element?
border-radius property
-
Which CSS properties are used to create space around elements, outside of any defined borders?
CSS margin properties
-
Are negative values allowed with the margin properties?
yes
-
How would margin be applied for this style rule margin: 25px 50px 75px;?
Top margin is 25px, right and left are 50px, and bottom margin is 75px.
-
What will margin: auto; do?
It will horizontally center the element within its container.
The element will then take up the specified width, and the remaining space will be split equally between left and right margins.
-
What is margin collapse?
when 2 margins collapse into a single margin
Top and bottom margins of elements are sometimes collapsed into a single margin that is equal to the largest of the two margins.
This does not happen with left and right margins.
-
Which properties are used to generate space around an element’s content, inside of any defined borders?
CSS padding properties
-
Are negative values allowed with the padding properties?
No
-
If an element has a specified width, is padding added to this element also added to the total width of the element?
Yes and is often an undesirable result
-
What is the max-width property used for?
to define the maximum width of an element
-
What does the box model consist of?
content, padding, borders, and margins
-
Which property is used to set the color of text?
the color property
-
Name three values that you can assign to the horizontal alignment of text using the text-align property.
left or right aligned, centered, or justified
-
What do the CSS font properites define?
font style, variant, weight, size/line-height, and family
-
The simplest way to add an icon to your HTML page, is with an icon library. Name one such library.
Font Awesome
-
What are the four link states that CSS can style?
a:link - a normal, unvisited link
a:visited - a link the user has visited
a:hover - a link when the user mouses over it
a:active - a link the moment it is clicked
-
Which property specifies the type of list item marker?
list-style-type property
-
What are the two default display values for most elements?
block or inline