CSS
Webpage
designers use HTML to mark up a document’s structure.
Browsers are given instructions from HTML as to how to display
elements.
CSS allows the designer to
be in control while using CSS and HTML to build the structure and display of
content
A rule describes one
aspect of style such as color.
A style sheet describes 1
or more rules for HTML
The part before the brace “H1”
for example is called the selector. The
part within the brackets {color:green} is called the declaration.
The declaration tells what
will be done to the selector
A declaration contains a
property and value. Color:green
CSS allows the designer to
basically short hand directions like:
H1 {
color: green;
text-align: center;
}
All the declarations speak
on the selector so they are grouped together and separated by a semi colon
HMTL and CSS have to be
joined together to properly present the document. This can be achieved by:
1.
Apply the basic, document-wide style sheet for the document
by using the style element.
2.
Apply a style sheet to an individual element using the style attribute.
3.
Link an external style sheet to the document using the link element.
4.
Import a style sheet using the CSS @import notation.
The browser needs to be
told that CSS needs to be used. That
could like this: "text/css."
Inheritance
in CSS allows elements to be transferred, like h1 to h2.
Some
elements, such as background, do not inherit.
CSS dictates things like font: H1 { font: 36pt serif } and margins margin-top, margin-right, margin-bottom, and margin-left.
Links are also dictated by CSS, determining how the person visiting the site will view them. An example would be: A:link, A:visited { text-decoration: none }
A:hover { background: cyan }
NO muddiest point
No comments:
Post a Comment