Difference between revisions of "Cascading Style Sheets"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
(See also)
Line 19: Line 19:
  
 
This design approach is identified as a "separation" because it largely supersedes the antecedent methodology in which a page's markup (HTML) defined both style and structure.  (For example, the <code>font</code> element.)
 
This design approach is identified as a "separation" because it largely supersedes the antecedent methodology in which a page's markup (HTML) defined both style and structure.  (For example, the <code>font</code> element.)
 +
 +
== Selectors ==
 +
 +
[[Selector|Selectors]] specify which [[HTML element|HTML elements]] will be selected -- and thus affected -- by a style rule.
 +
 +
=== Fundamental selectors ===
 +
 +
* [[Class selector (CSS)]]
 +
* [[HTML element selector (CSS)]]
 +
* [[ID selector (CSS)]]
  
 
== See also ==
 
== See also ==
  
 +
* [[Class selector (CSS)]]
 
* [[Conditional stylesheets]]
 
* [[Conditional stylesheets]]
 
* [[CSS hacks]]
 
* [[CSS hacks]]
 
* [[Declaration (CSS)]]
 
* [[Declaration (CSS)]]
 
* [[External style sheet]]
 
* [[External style sheet]]
* [[HTML element rule (CSS)]]
+
* [[HTML element selector (CSS)]]
 +
* [[ID selector (CSS)]]
 
* [[Less (stylesheet language)]]
 
* [[Less (stylesheet language)]]
 
* [[Responsive web design]]
 
* [[Responsive web design]]

Revision as of 11:20, 16 February 2016

Cascading Style Sheets (CSS) is a language used to define the presentation ("look and feel") of a document written in HTML or some other markup language.

Style sheet

See Style sheet (web design) for a discussion of style sheets.

Web page layout

CSS is fundamental to web page layout.

Separation of concerns

Separation of concerns is a design principle which requires certain entities to take certain responsibilities, and other entities to take other responsibilities.

In web design, separations of concerns includes the separation of:

  • Style sheet provide design, presentation, layout, color
  • Markup tags (HTML or XHTML) provides semantic content and structure

This design approach is identified as a "separation" because it largely supersedes the antecedent methodology in which a page's markup (HTML) defined both style and structure. (For example, the font element.)

Selectors

Selectors specify which HTML elements will be selected -- and thus affected -- by a style rule.

Fundamental selectors

See also

External links