The displays of the homepage have been united with Style Sheet

I think that you may individually specify the design and the display of the individual page in little the number of pages of homepages in the file. However, when the number of pages becomes 200-300 or more, the management becomes difficult.

It is necessary to change the full page for feelings to change on the way and to change the display for a moment. Moreover, if the writing of the usage of tag and the writing order, etc. is not united, the batch change of the full page becomes impossible in the vicinity though it is possible to rewrite by substitution with the software such as TEXTSS if full page writing is united.

Moreover, if the design and the display method on the page are individually written in the content of an individual homepage, the size of the HTML file inevitably grows. Therefore, the display of the homepage slows.

To prevent this, we will recommend home page design and the display to be described with external style sheet CSS (Cascading Style Sheets cascading Style Sheet) at early time.

Design and display of page with external style sheet

Even if Style Sheet of the same content is written on each page, the design and the display of the page can be united, and writing in the external style sheet becomes when there are a lot of pages and it becomes easy to change easily.

Specification of standard Style Sheet language

It is filing it with the META tag Reference language (CSS) of Style Sheet used by the style attribute can be specified. It describes it in head tag < HEAD ></HEAD > as follows.

This specification is used to tell to a browser CSS (cascading Style Sheet) the Style Sheet language used on the page.

<meta http-equiv="Content-Style-Type" content="text/css" />

Specifying it as much as possible might find in the page that uses Style Sheet and the mistake not be found though there seems to be no problem even if it omits it. It is not necessary at an external style sheet alone.

How to read external style sheet (CSS)

The method of reading the external style sheet is described in head tag < HEAD ></HEAD > as follows.

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

In this case, It is time when it is in the folder that the file of Style Sheet named style.css is the same as the HTML file (directory). The file name doesn't care about another thing if the extension is CSS either.

Content of external style sheet (CSS)

For instance, if it very introduces part, it becomes the following about Style Sheet used on my homepage.

p {margin-top:5px;margin-bottom:5px;font-size:medium;text-align:left;}
.cent_txt {text-align:center;}
#main {max-width:810px;margin:0 10px 0 180px;}

Easy explanation of external style sheet (CSS)

Above In the example of the P tag, the blank of five pixels is taken behind in front of P tag, the size of the character is made an inside, and it writes by left justify.

".cent_txt" "Dot + cent_txt" of the following line It is a description method when specifying it by class="cent_txt". Even degrees of this class how many can be used on the page compared with id described later.

"#main" of the following line It is a description method when specifying it by id="main". This id is like to above-mentioned class well, and id is specified for the one used only once on the page. In this case, because the reading position of the main page is specified, it uses it only once.

Moreover, when the comment is described in Style Sheet, it describes it like /* comment */.

A detailed usage of Style Sheet is

How to use of the external style sheet in the HTML file.

Style Sheet set to the tag is usually automatically applied only by using tag.

To change specially, as follows is done. For instance, when it wants to center the character specially if specified for the left to be drawn with CSS and to use it by it, the character : when writing with P tag.

<p class="cent_txt">character string</p>

The class is specified for this.

Moreover, to set two or more class specification to tag, the class name is delimited in half angle space and specified.

In another example, the description of the main part on my homepage is as follows.

<div id="main">main part (right post)</div>

Generally, I think that I often specify Style Sheet in <DIV> tag like this.

The file of Style Sheet when the design and the display method on the page made thus are changed It is possible to do to the full page only by changing style.css. It is very convenient.

Two or more Style Sheets are applied in the class in one tag.

I might want usually to apply two Style Sheets or more to one tag in the class though one Style Sheet is applied to one tag in class. Two or more styles are delimited in half angle space and described as follows at this time.

<div class="style1 style2 style3">

Confirmation by a browser of Style Sheet non-correspondence

You will confirm how to see it by a browser of the Style Sheet non-correspondence.

In opera (Opera) and version 11, "Style" of "Display" includes "User-mode". It is the same as invalidating Style Sheet if nothing is applied to all styles by an user-mode here.

Let's assume that it is hurried, displayed well when doing like this, and there only haves especially to be no problem.