Learning to build web pages with Xhtml + CSS2

Source: Internet
Author: User
Tags php language

Article 1: Get used to the Xhtml + CSS2 Layout

Recently, many websites have used the Xhtml1.0 standard to reconstruct websites, including yahoo, 163, and CSDN. Recently, the Xhtml + CSS2 boom has been even higher than a wave, so I started to learn it, and gradually fell in love with them. The page construction technology is a number of MM, and we will also be happy and tired.

I. Why should I learn Xhtml + CSS2?

First, the standard code facilitates the smooth display of web pages in various browsers.
Some non-standard code web pages can be normally displayed in IE, and may not be normally displayed in Firefox and Opera. At this point, we have to say that Internet Explorer is more inclusive than Internet Explorer. Although the mainstream browser is Internet Explorer and various browsers with Internet Explorer as the kernel, however, we cannot ignore the increasing user base of browsers such as Firefox and Opera, which are mostly computer-proficient, if they scold their websites for being too spam, I think it should be a bad taste.
Of course, this does not mean that the web pages using tables do not conform to the standards (we should also discuss some drawbacks of using tables), but many people are used to using Photoshop (hereinafter abbreviated as PS) design the plan, use Fireworks (FW) or Imageready (IR) for cutting, and then use Dreamweaver (DW) or Forntpage (FP) to generate html, these visual software is convenient, but there are many problems arising from this. These software will automatically increase or decrease some code. If you do not have the habit of viewing the code, this can easily lead to the generation of some nonstandard code ., Because the slices made using FW or IR cannot be intuitively described on the image features, the html made in this way will also cause trouble for future maintenance.

Secondly, Xhtml + CSS2 make the page layout easier.
If you have previously laid out a page or set some relatively complex effects, the common practice is to use a large number of table nesting to layout a page and use cells to describe the area, in this way, WYSIWYG and other software are relatively intuitive, but this affects the download speed in several aspects, because table display is not the same as DIV, the display of table in the browser can only be displayed after all download, which affects the download speed. Secondly, this structure is not intuitive for handwritten code, the nesting of a large pile of tables may make designers who are used to writing code dizzy. In addition, it may also involve the merging of cells. If you accidentally mistake a colspan = "? ", The layout of the entire page will be completely invisible.
Using CSS for layout is like operating layers in PS. Using relative and absolute concepts in CSS, the layout of the entire page is much easier and more convenient.

In addition, Xhtml can reduce the size of webpage files
An important purpose of using Xhtml + CSS2 to build a web page is to improve the browsing speed. Although the network speed is getting bigger and bigger now, who doesn't want to speed their websites faster, some people have also said that "The farthest distance in the world Is not from the Earth to the sun, but from China Telecom to China Netcom." If your site on the telecommunications server is browsed by users of the China Netcom line, the webpage file size will inevitably affect the viewer's feelings. Using Xhtml to build Web pages helps you solve this problem. After my tests, we can achieve the same purpose. The size of web pages built using Xhtml is about 1/2 less than that built using traditional table methods. I believe many people will like the slim MM.

2. How to get started with learners of different levels

After feeling the above points, I began to get used to using Xhtml + CSS2 to build websites. So I have talked so much about where to get started? Here, for different groups of people, I suggest the following methods to get started:

For beginners who do not know html and css at all: First, we suggest you learn the following html because it is easier to get started and familiar with some basic html syntax, start to learn some of the Xhtml standard writing methods. Here we recommend some learning materials:
Xhtml Chinese reference:
Http://www.standme.com/Xhtml.htm
Common HTML and xhtml q &:
Http://www.transwiki.org/cn/xhtmlfaq.htm
You can view these pages if you have basic English skills:
XHTML basic:
Http://www.w3.org/TR/xhtml-basic/
XHTML 1.0 The Extensible HyperText Markup Language (Second Edition ):
Http://www.w3.org/TR/xhtml1/
XHTML 1.1-Module-based XHTML:
Http://www.w3.org/TR/xhtml11/
XHTML 2.0:
Http://www.w3.org/TR/xhtml2/

For friends with html basics, I recommend this article written by Alibaba Cloud:
Step-by-Step learning of Xhtml + CSS2:
Http://www.w3cn.org/article/step/index.html
Step by step, the transformation from a nonstandard html to Xhtml

For friends who have basic html and PHP language, we recommend a quick method to deal with Xhtml:
Install a Wordpress, official site: www.wordpress.org. The latest version is 1.5.2. Later, you will be familiar with the wordpress template System in the shortest time. Modifying the following wordpress template is a feeling of familiarity with DIV and CSS2, find a good page and change the wordpress template to the same one. The last step is to create a set of wordpress templates based on the Xhtml + CSS2 knowledge you have learned. After these three steps, I think your Xhtml + CSS2 is a real entry point.

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.