Sideway
output.to from Sideway



Draft for Information Only

Content

CSS Knowledge Baseref. CSS 2.1
‚ÄÉNormalization of Style in HTML

CSS Knowledge Baseref. CSS 2.1

Normalization of Style in HTML

In order to make HTML elements rendered by user agent more consitstently with the author's specification, some properties of each element are needed to be normalized. Properties of each element can be specified accordingly.

  1. For examples, color and background of an element.
    /* last update 27Jul2016 */
    body 		{color: "Times New Roman";}		/* CSS 2.1 initial: depends on user agent */
    body 		{background-color: transparent;}   	/* CSS 2.1 initial: transparent  */
    body 		{background-image: none;}  		/* CSS 2.1 initial: none  */
    body 		{background-attachment: scroll;}   	/* CSS 2.1 initial: scroll */
    body 		{background-position: 0 0;} 	  	/* CSS 2.1 initial: 0% 0% */
    body 		{background-repeat: repeat;}		/* CSS 2.1 initial: repeat */
    
  2. For examples, Font and Text of an element.
    /* last update 27Jul2016 */
    html            {font-family: "Times New Roman";}	/* CSS 2.1 initial:depends on user agent */
    body            {font-size: 16px;}			/* CSS 2.1 initial: medium */
    h1              {font-size: 1.75em;}			/* CSS 2.1 HTML: 2em */
    h2              {font-size: 1.5em;}			/* CSS 2.1 HTML: 1.5em */
    h3              {font-size: 1.37em;}			/* CSS 2.1 HTML: 1.17em */
    h4              {font-size: 1.12em;}			/* CSS 2.1 HTML: 1em */
    h5              {font-size: 1em;}			/* CSS 2.1 HTML: 0.83em */
    h6              {font-size: 0.87em;}			/* CSS 2.1 HTML: 0.75em */
    h1,h3,h5        {font-style: italic;}			/* CSS 2.1 initial: normal */
    h2,h4,h6,p      {font-style: normal;}
    p               {font-variant: normal;}			/* CSS 2.1 initial: normal */
    h1,h2,h3,h4,h5,
    h6              {font-weight: bold;}			/* font-weight CSS 2.1 initial: normal */
    p               {font-weight: normal;}
    p               {text-align:justify;}			/* text-align CSS 2.1 initial: a nameless value that acts as 'left' if 'direction' is 'ltr', 'right' if 'direction' is 'rtl'  */
    h1,h2,h3        {text-decoration:underline;}            /* text-decoration CSS 2.1 CSS 2.1 initial: */
    h4,h5,h6        {text-decoration:none;}
    p		{line-height: 115%;}			/* CSS 2.1 initial: normal */
    p		{text-indent: 0;}                       /* CSS 2.1 initial: 0 */
    p		{text-transform: none;}                 /* CSS 2.1 initial: none */
    
    
  3. For examples, the box model.
    /* last update 27Jul2016 */
    div,p,img 	{height: auto;} 			/* CSS 2.1 initial: 0 0 */
    div 		{max-height: 300px;} 			/* CSS 2.1 initial: none */
    div 		{min-height: 0;} 			/* CSS 2.1 initial: 0 */
    div 		{max-width: none;} 			/* CSS 2.1 initial: none */
    div 		{min-height: 0;} 			/* CSS 2.1 initial: 0 */
    div 		{width: auto;} 				/* CSS 2.1 initial: auto */
    
    
  4. For examples, area outside the content area of a box model.
    /* last update 27Jul2016 */
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,pre,ul,ol,img {border-color: black;}                  /* CSS 2.1 initial: depends on user agent */
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,pre,ul,ol,img {border-style:solid;}                   /* CSS 2.1 initial: none */
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,pre,ul,ol,img {border-width:0;}                       /* CSS 2.1 initial: 0 */
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,pre,ul,ol     {margin: 0;}                            /* CSS 2.1 initial: 0 */
    img             {margin: 0 auto;}                       /* CSS 2.1 initial: 0 0 */
    body,div,h1,h2,
    h3,h4,h5,h6,a,p,
    h1,h2,h3        {margin-top: 0.6em;}                    /* CSS 2.1 initial: 0 */
    div,h4,h5,h6,a,
    p,pre,ul,ol     {margin-top: 0.5em;}                    /* CSS 2.1 initial: 0 */
    div,h1,h2,h3,
    h4,h5,h6,a,p,
    pre,ul,ol       {margin-bottom: 0.3em;}                 /* CSS 2.1 initial: 0 */
    pre             {outline: invert solid 1px;}            /* CSS 2.1 initial: invert none medium */
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,ul,ol,img     {outline: silver solid 0;}
    body,div,h1,h2,
    h3,h4,h5,h6,a,
    p,ul,ol,img     {padding: 0;}                           /* CSS 2.1 initial: 0 */
    pre             {padding: 0;}
    
    
  5. For examples, layout of a box model.
    /* last update 27Jul2016 */
    body,div,pre,p	{clear: both;} 			/* CSS 2.1 initial: none */
    img 		{display: block;} 			/* CSS 2.1 initial: inline */
    body 		{float: left;} 			/* CSS 2.1 initial: none */
    div,pre 		{overflow: auto;} 			/* CSS 2.1 initial: visible */
    div,img 		{position: relative;} 		/* CSS 2.1 initial: static */
    body,div,pre,p	{visibility: visible;} 		/* CSS 2.1 initial: visible */
    p		{white-space: normal;}                  /* CSS 2.1 initial: normal */
    img		{white-space: nowrap;}
    img 		{z-index: 1;} 			/* CSS 2.1 initial: auto */
    
    
  6. For examples, generated elements.
    /* last update 27Jul2016 */
    ol,ul {list-style-image: none;} /* CSS 2.1 initial: none */
    ol,ul {list-style-position: outside;} /* CSS 2.1 initial: outside */
    ol,ul {list-style-type: none;} /* CSS 2.1 initial: disc */
    table {border-collapse: collapse;} /* CSS 2.1 initial: separate */
    table {border-spacing: 0;} /* CSS 2.1 initial: 0 */
    caption {caption-side: top;} /* CSS 2.1 initial: */
    table {empty-cells: show;} /* CSS 2.1 initial: show */
    table {table-layout: auto;} /* CSS 2.1 initial: auto */
    
    
  7. For examples, ......
    /* last update 27Jul2016 */
     {:;} /* CSS 2.1 initial: */
    
    

©sideway
close

References

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

ID: 160700034 Last Updated: 2016/7/27 Revision: Ref:

IMAGE

Home (5)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (336)

Reference (66)

Computer

Hardware (149)

Software

Application (187)

Digitization (24)

Numeric (19)

Programming

Web (574)new

CSS (SC)

HTML

Knowledge Base

Common Color (SC)

Html Entity (Unicode) (SC)

Html 401 Special (SC)

OS (370)new

MS Windows

Windows10 (SC)

DeskTop (6)

Knowledge

Mathematics

Formulas (8)

Number Theory (206)

Algebra (20)new

Trigonometry (18)

Geometry (18)

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)

Biology (1)

Geography (1)

Latest Updated Links

Copyright © 2000-2019 Sideway . All rights reserved Disclaimers last modified on 10 Feb 2019