Sideway
output.to from Sideway
Draft for Information Only

Content

Cascading Styleref. CSS 2.1
  Data Values of Property Rules
   Specified Value
   Calculated Value
  Controls of Property Rules
   Cascade
  Order and Inheritance
  Types of Styles
    Inline Stylesine Styles
    Embedded Styles
    External Style Sheets
    Importing Style Sheets

Cascading Styleref. CSS 2.1

Cascading style sheets is actually a collection of rules or styles collected when loading a document. In general, styling rules of a document can be saved in .css files, be embedded into the head of a HTML file, be specified through the attributes of HTML tags, and be assigned by the user agent. These style rules are cascaded together with priority.

Data Values of Property Rules

The data values of property rules are only the information used by a user agent to derive the actual value used for rendering a document properly. A specified value is

Specified Value

Specified value is usually the data value of a property specified by auther of the document. In order to simplify the implement of style sheet, all user agents must assign specified values to properties of standard HTML tags such that all HTML tags can be rendered with all necessay information. User can also specify some specified values of properties through user agent for a particular document.

A specified value of each propery of an element is assigned by user agents according to the priority of the value. The value of a property of an element is obtained with the highest priority from the cascading result for the same property of the corresponding element. The values of unassigned properties of an element other then the root element can be obtained with lower priority from the calculated values of the corresponding properties of the same element respectively. Finally, all values of unassigned properties of each element is assigned a default value by user agent. The default value of a property of an element is the preset value assigned by the user agent following the browser style of HTML element which may be different from the initial value of each property specified in the CSS property's definition.

Calculated Value

Besides determining the specified values of every properties of all HTML tags, all user agents also have the capability to compute the correct values of every properties of all HTML tags such that all HTML tags can be rendered properly.

The specified value will first be resolved into a computered value according to the computered value of each property specified in the CSS property's definition. The computered value is also computed according to other specifications, e.g. inherit values. applies to, specified in the CSS property's definition. Since not all computed values can be used for formatting the document directly, or some computed values needed to be verified or determined when the document is being formatted, a further computation is need for all computed value in order to accept the computed value as is or to resolve any distorting and dependencies related with. Although a used value is always the value used for rendering, a used value must be further resolved to an actual value that match with the media rending environment. In other words, an actual value is the convertion or approximation of the used value according to the media environment.

Controls of Property Rules

Since styling property rules can be specified by more than one method or one origin, a mechanism should be used by a user agent to decide the priority of a property rule.

Cascade

Besides the style sheets specified by the author and user agent, user may also specify a style sheet for a particular document. In other words, three source of style sheets that are used to render the same document.

Order and Inheritance

 

Types of Styles

There are a few ways to attach rendering information to a HTML document.

Inline Stylesine Styles

Style element attributes are used to implement the rendering style as the attributes of an element.

<h2 style="color: blue">

Embedded Styles

A style section is included in the head section of HTML document for grouping all rendering styles

<style type="text/css">h2  { color: blue }</style>

External Style Sheets

All the rendering styles are grouped into an style sheet and is linked to the HTML document by a link in the head section after the <title> element.

<link rel="stylesheet" type="text/css" href="external.css" />

Importing Style Sheets

External style sheet is imported to a cascading style sheet by an importing rule at the beginning of a cascading style sheet.

@import url("external.css");

©sideway

ID: 160700028 Last Updated: 7/23/2016 Revision: 0 Ref:

close

References

  1. http://www.w3.org/TR/1999/REC-html401-1999, 1999, HTML 4.01 Specification: W3C Recommendation, updated 24 December 1999
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019