Web development-Starting from the Foundation 1

Source: Internet
Author: User

Recommend a website: Standard road, explain the development of Web site is indeed very detailed, with an example of the practice of speaking side, it is a surprise

In my experience, the foundation of Web site development can go to W3school to learn the basic syntax of HTML and CSS, and then refer to the above mentioned site Div+css tutorial Step by step build up their first page, progress will be very fast.

The following notes are recorded in the study, often recorded, lay a good foundation.

1. Document Type DOCTYPE

Its purpose is to tell the standard generic markup Language parser What kind of document type definition (DTD) It should use to parse the document . deletion may cause some style sheets to fail or other unexpected problems.

XHTML defines three file type declarations, with the most common being XHTML transitional. Others are strict (strict type), FRAMESET (frame type).

Shaped like: <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Strict applies To: need clean mark, avoid the confusion of the manifestation. Use in conjunction with cascading style sheets.
Transitional applies to: when you need to take advantage of HTML performance features, and when you need to write XHTML for browsers that do not support cascading style sheets.
Frameset for: When you need to use the HTML framework to split the browser window into two or more frames.

2.CSS style sheets and other files remember to keep the same encoding as this document, or it will appear garbled. tags in 3.xhtml must have an end tag such as <p></p>

1. Introduction of external styles (recommended): <link href= "Layout.css" rel= "stylesheet" type= "Text/css"/>

2. Internal style:<style> H2 {color: #f00;} </style>

3. Inline style (does not implement the separation of style and content, not recommended): <p style= "FONT-SIZE:18PX;" > Internal Styles </p>

4. Import style (import other CSS files in CSS file): @import url ("/css/global.css");

5. Style Action Range

CSS types can be divided into tags (redefining HTML elements), classes (which can be applied with any HTML element), IDs (applied to only one HTML element);

The smaller the scope, the higher the priority, such as the ID priority higher than the class.

6. Box model

The contents (content) padding (padding) border (border) margin (margin) is important for understanding blocky layouts, as described in the box model

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.