DIV+CSS Web Template Development The benefits of initializing CSS

Source: Internet
Author: User
Tags html tags

Why to initialize CSS, what is the role?

Each time we create a new Web site or new page, we initialize CSS style attributes to make it more convenient and accurate for the CSS or HTML tags we use. If we do not initialize CSS style properties, will increase the amount of CSS code, for us to save the Web page code, save web page download time, but also make us develop web content more convenient and concise, do not consider a lot. If you do not initialize CSS, we will not know if we have set the CSS attribute here, and whether it is the same as the previous CSS properties, and whether it unifies the style and style of the whole Web page when we develop the more complex web pages.

What is required to initialize the location:

It is generally necessary to initialize the H1 to H4 tags, table, text size, text no link color, hyperlink style, DIV, center, OL, UL, Li, img and so on style, here we summed up the initialization of the CSS file or called CSS Templates for everyone to use, according to their actual increase or decrease.

CSS templates and HTML templates are useful for each new development page using

First of all to share my CSS page and the use of the opening CSS template; Html+css Template DIVCSS5 initialization xhtml (DIV+CSS initialization template)

This provides a basic template module for initializing the div+css template DIVCSS5 each time a development project is used.

Temporarily show the UTF-8 version of the template code

The common CSS code template for each new development page is as follows:

@charset "Utf-8";
Body, Div,iframe, UL, OL, DL, DT, DD, Li, DL,
H1, H2, H3, H4, Table,th, TD, Input, button, select,
textarea {margin:0; padding:0;
font-style:normal;font:12px/22px "5b8b4f53", Arial, Helvetica, Sans-serif;}
* 5b8b4f53 more Chinese fonts * *
OL, UL, Li{list-style:none;}
img {border:0; vertical-align:middle;}
Body{color: #000000; background: #FFF; text-align:center;}
. clear{clear:both;height:1px;width:100%;
Overflow:hidden; margin-top:-1px;}
A{color: #000000; text-decoration:none;}
A:hover{color: #F00;}

. Red,. Red a{color: #F00;}
. Blue,. Blue a{color: #1E51A2;

. Lf{float:left;}
. Rt{float:right;}

. pt5{padding-top:5px;}
. pb5{padding-bottom:5px;}

#header, #main, #footer {margin:0 auto;
width:980px; Overflow:hidden}

#main_left {float:left;}
#main_right {float:right;}

This is the first time to initialize the entire station of the CSS, and new to belong to, so as to unify the whole station style.

The HTML code template for each new development page is as follows:

<! DOCTYPE html>
<meta charset= "Utf-8"/>
<title>html Template UTF-8 </title>
<meta name= "keywords" content= "keyword"/>
<meta name= "description" content= "keyword description"/>
<link rel= "stylesheet" href= "Images/style.css"/>
<script src= "JS file path Address" type= "Text/javascript" ></script>
<body>
<a href= "http://www.baidu.com/" >111cn.com </a>
You are welcome to use the initialized html+css template! <br/>
Learning URL: www.111cn.com
<div class= "Clear" ></div>
<span style= "Display:none" >DIVCSS5 hint here to place the site statistics code </span>
</body>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.