CSS Notes
CSS Notes
With CSS, you can control the color,font, the size of text, the spacing between
elements, how elements are positioned
and laid out, what background images or background colors are to be used, different
displays for different devices and screen
sizes, and much more
The word cascading means that a style applied to a parent element will also apply
to all children elements within the parent.
So, if you set the color of the body text to "blue", all headings, paragraphs,
and other text elements within the body will also get the same color (unless you
specify something else)!
Using CSS
CSS can be added to HTML documents in 3 ways:
.Inline- by using the style attribute inside HTML elements
.Internal-by using a <Style> element in the <head> section
.External-by using a <Link> Element to link to an external CSS file
To use External method right below title put link then press tab, then type in
href= the .css file to apply what ever styling
to your html in the .css file.
CSS Selectors
<Div class="">
</div>
p{
margin:5px 10px;
}
margin-top:5px;
margin-bottom:5px;
margin-right:10px;
margin-left:10px;
}
This should help:An element's padding area is the space between its content and its
border.
Note: Padding creates extra space within an element. In contrast, margin creates
extra space around an element.
The CSS border property defines the width, line style, and color of the border of a
box.
It is a shorthand property for setting the border-width, border-style, and border-
color CSS properties.
Can use <div class to use it to reference parts of html to css to change be it
font, box sizing, padding, border, float,
and so on
Can also use <div id which is still a reference to edit on css but you write it
like this # at the start instead of the .
Positioning In CSS
.Static
.Relative
.Absolute
.Fixed
.Initial
.Inherit