search
HomeWeb Front-endCSS TutorialSome thoughts on learning Xhtml+CSS2_CSS/HTML

Since the W3C established the Xhtml1.0 standard, many websites have begun to use it to reconstruct their sites, such as yahoo, 163, CSDN, etc. The craze of Xhtml+CSS2 has been increasing in recent times, so occasionally I also started to learn them, and gradually fell in love with them. Now let’s talk about my learning experience in the recent period.

Why you should learn Xhtml+CSS2

First of all, standardized code can be displayed smoothly in various browsers.

Some web pages with non-standard codes can be displayed normally in IE, but they may not be displayed properly in Firefox and Opera. Although the current mainstream browsers are IE and various browsers with IE as the core, we do not rule out the gradually increasing user base of browsers such as Firefox and Opera, and most of these groups are veterans who are more proficient in computers. I think it would be a bad feeling if they scolded their website for being rubbish, haha.
Of course, this does not mean that web pages made using tables, etc., do not meet the standards. It is just that many people are currently accustomed to using Forntpage or Dreamweaver for design. These visual software are convenient, but they also bring many problems. , these software will more or less automatically add or subtract some codes. If you don't have the habit of checking the code, it can easily lead to irregular codes.

Secondly, DIV + CSS2 makes page layout simpler
It is said to be Xhtml+CSS2, but in fact, DIV+CSS2 is more often used to build a website. If you have used a lot of nested tables to layout or set up a page before, you usually divide a page and use cells to describe areas. This is more intuitive in software such as WYSIWYG, but it has some effects. There are several aspects. First, it may affect the download speed. Secondly, for handwritten code, such a structure is very unintuitive. In addition, one of the involved areas is the merging of cells. If you accidentally make a mistake with a colspan="?", Then the layout of the entire page will be completely different.
Using CSS for layout is just like operating layers in PS, because there are relative and absolute concepts in CSS, haha, it makes page layout easier and more convenient.

In addition, Xhtml can reduce the file size
Although the Internet speed is getting faster and faster now, who doesn’t want their site to be faster? Someone once said, “The furthest distance in the world is not the earth. to the sun, but from China Telecom to China Netcom." If your site on the telecom server is browsed by users of Netcom lines, the web page file size will inevitably affect the viewer's experience. Using Xhtml will help you solve this problem, haha.

In view of the above points, I gradually became accustomed to using Xhtml+CSS2 to build websites.

Experiences during learning

Code writing tools: Since there are no visual tools to write Xhtml+CSS2 pages, it is necessary to find a code writing tool that suits you. I have been I am using Editplus, and I recommend it as you recommended it. For some tips on using Editplus, you can read here:
http://www.ifess.com/?p=23

Page layout structure: A page must first have an overall layout, such as header, menu, sidebar, content, footer, etc., by defining the CSS attributes of these elements to give the page an overall division, and then write specific details in these elements. content so that the page doesn’t look cluttered.

CSS writing method: In a project, the attribute values ​​defining content attributes and structural layout attributes can be written separately, which makes it easy to find and modify. Try to reduce repeated definitions as much as possible, and do not write repeated attributes that can be inherited. Try to use CSS attribute values ​​that are compatible with IE and Firefox, because some attributes cannot be displayed normally after being written, which is equivalent to wasted effort.

Xhtml file: Try to use external links to call CSS files. CSS attributes that only appear once can also be written inside the file. It is best to write comments when writing code, and be sure to pay attention to the alignment format to facilitate error checking.

That’s all I can think of for now, everyone is welcome to discuss it together.

Attached below are some commonly used resources and links:

CSS2.0 Chinese Manual, Korean Business Website Design Analysis, Color Standard 2004, JS Manual:
http:// www.im286.com/viewthread.php?tid=875287
Xhtml1.0 validation page:
http://validator.w3.org/checklink
CSS Validation page:
http://jigsaw.w3.org/css-validator/
CSS online optimization:
http://flumpcakes.co.uk/ css/optimiser/


Article source: http://www.ifess.com/?p=70 Author: Outdated Ipv6, please indicate when reprinting.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Demystifying Screen Readers: Accessible Forms & Best PracticesDemystifying Screen Readers: Accessible Forms & Best PracticesMar 08, 2025 am 09:45 AM

This is the 3rd post in a small series we did on form accessibility. If you missed the second post, check out "Managing User Focus with :focus-visible". In

Adding Box Shadows to WordPress Blocks and ElementsAdding Box Shadows to WordPress Blocks and ElementsMar 09, 2025 pm 12:53 PM

The CSS box-shadow and outline properties gained theme.json support in WordPress 6.1. Let's look at a few examples of how it works in real themes, and what options we have to apply these styles to WordPress blocks and elements.

Create a JavaScript Contact Form With the Smart Forms FrameworkCreate a JavaScript Contact Form With the Smart Forms FrameworkMar 07, 2025 am 11:33 AM

This tutorial demonstrates creating professional-looking JavaScript forms using the Smart Forms framework (note: no longer available). While the framework itself is unavailable, the principles and techniques remain relevant for other form builders.

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)Mar 04, 2025 am 10:22 AM

This article explores the top PHP form builder scripts available on Envato Market, comparing their features, flexibility, and design. Before diving into specific options, let's understand what a PHP form builder is and why you'd use one. A PHP form

Working With GraphQL CachingWorking With GraphQL CachingMar 19, 2025 am 09:36 AM

If you’ve recently started working with GraphQL, or reviewed its pros and cons, you’ve no doubt heard things like “GraphQL doesn’t support caching” or

Making Your First Custom Svelte TransitionMaking Your First Custom Svelte TransitionMar 15, 2025 am 11:08 AM

The Svelte transition API provides a way to animate components when they enter or leave the document, including custom Svelte transitions.

Show, Don't TellShow, Don't TellMar 16, 2025 am 11:49 AM

How much time do you spend designing the content presentation for your websites? When you write a new blog post or create a new page, are you thinking about

Classy and Cool Custom CSS Scrollbars: A ShowcaseClassy and Cool Custom CSS Scrollbars: A ShowcaseMar 10, 2025 am 11:37 AM

In this article we will be diving into the world of scrollbars. I know, it doesn’t sound too glamorous, but trust me, a well-designed page goes hand-in-hand

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version