Home Web Front-end CSS Tutorial Summary of things to pay attention to in XHTML CSS design under Web2.0_Experience exchange

Summary of things to pay attention to in XHTML CSS design under Web2.0_Experience exchange

May 16, 2016 pm 12:06 PM
Precautions

Notes:
1. Statements other than selecting DOCTYPE must be written in lowercase English letters. These include mouse actions generated by Macromedia Dreamweaver, such as OnMouseOver, which must also be modified to onmouseover.

2. XHTML syntax requires that all tags must have a beginning and an end. For example,

and ,

and

, etc. For unpaired tags, it is required to add a space at the end of the tag, followed by a "/". For example,
is written as
and Summary of things to pay attention to in XHTML CSS design under Web2.0_Experience exchange is written as Summary of things to pay attention to in XHTML CSS design under Web2.0_Experience exchange. The reason for adding spaces is to prevent the browser from not recognizing the codes when they are connected together.

3. All XML tags must be nested reasonably. For example:

must be changed to:

, that is to say, the nesting layer by layer must be strictly symmetrical.

4. All attributes must be enclosed in quotation marks "". For example: must be modified to: . In special cases, you need to use double quotes in the attribute value, you can use ", single quotes can use ', for example: .

5. Put all ), which is not part of the label, must be encoded as & g t ; , any ampersand (&) that is not part of the entity must be encoded as & amp ; . (There are no spaces between the above code letters)

6. Assign a value to all attributes. For example : must be modified to: .

7. Do not use "--" in the comment content.For example: You can replace the internal dotted lines with equal signs or spaces .

The first is the standard way of writing the file header:

CODE:
ttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\" target=\"_blank\">http://www.w3.org/TR/xhtml1/DTD /xhtml1-transitional.dtd">
http ://www.w3.org/1999/xhtml" lang="utf-8">








[Copy to clipboard]



In terms of the definition of CSS, it is worth recommending a universal font setting scheme, the content is as follows:
CODE:
body { font -family : "Lucida Grande", Verdana, Lucida, Arial, Helvetica, Song Dynasty, sans-serif; }
[Copy to clipboard]


Fonts are selected in the order listed. If the user's computer contains the Lucida Grande font, the document will be designated Lucida Grande.If not, it is designated as the Verdana font, if there is no Verdana, it is designated as the Lucida font, and so on;

Lucida Grande font is suitable for Mac OS X;

Verdana font is suitable for all Windows system;

Lucida is suitable for UNIX users;

"Song Ti" is suitable for simplified Chinese users;

If none of the listed fonts are available, the default sans-serif Fonts are guaranteed to be called.


Four pseudo-classes are used in CSS to define link styles, namely: a:link, a:visited, a:hover and a:active, for example:

a :link{font-weight : bold ;text-decoration : none ;color : #c00 ;}
a:visited {font-weight : bold ;text-decoration : none ;color : #c30 ;}
a :hover {font-weight : bold ;text-decoration : underline ;color : #f60 ;}
a:active {font-weight : bold ;text-decoration : none ;color : #F90 ;}
But you must pay attention to the order when writing. The correct order is: LVHA. If you don't write it like this, the effect may be different from what you expected.

The layout standardization of the middle part and the non-table implementation of the menu require practical guidance, so I won’t write anything here. Let’s write some records about code verification.

XHTML validation common error causes comparison table:
No DOCTYPE Found! Falling Back to HTML 4.01 Transitional--DOCTYPE is not defined.

No Character Encoding Found! Falling back to UTF-8.--Undefined language encoding.

end tag for "img" omitted, but OMITTAG NO was specified--the image tag is not closed with "/".

an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified--the attribute value must be quoted.

element "DIV" undefined---DIV tag cannot be used in uppercase, it must be changed to lowercase div.

required attribute "alt" not specified---The image needs to add the alt attribute.

required attribute "type" not specified---The tag called by JS or CSS misses the type attribute.

CSS2 validation common error causes comparison table:
(Warning) Invalid number: color909090 is not a color value: 909090 ---The hexadecimal color value must be added with a "#" sign, that is, #909090
(Warning) Invalid number: margin-topUnknown dimension: 6pixels ---pixels is not a unit value, the correct way to write it is 6px
(Warning) The attribute scroll_bar-face-color does not exist: #eeeeee --- Define the scroll bar Color is a non-standard attribute
(Warning)Line: 0 font-family: It is recommended that you specify a type family as the last choice--W3C recommends that when defining fonts, it ends with a type of font, such as "sans- serif" to ensure that web fonts can be displayed under different operating systems
(Warning)Line: 0 can't find the warning message for otherprofile--Indicates that there are non-standard attributes or values ​​in the code, check The program cannot determine and provide corresponding warning information
Statement of this Website
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

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Introduction to matters needing attention during the Mingchao test Introduction to matters needing attention during the Mingchao test Mar 13, 2024 pm 08:13 PM

During the Mingchao test, please avoid system upgrades, factory resets, and parts replacement to prevent information loss and abnormal game login. Special reminder: There is no appeal channel during the testing period, so please handle it with caution. Introduction to matters needing attention during the Mingchao test: Do not upgrade the system, restore factory settings, replace equipment components, etc. Notes: 1. Please upgrade the system carefully during the test period to avoid information loss. 2. If the system is updated, it may cause the problem of being unable to log in to the game. 3. At this stage, the appeal channel has not yet been opened. Players are advised to choose whether to upgrade at their own discretion. 4. At the same time, one game account can only be used with one Android device and one PC. 5. It is recommended that you wait until the test is completed before upgrading the mobile phone system or restoring factory settings or replacing the device.

C++ Development Notes: Avoid Null Pointer Exceptions in C++ Code C++ Development Notes: Avoid Null Pointer Exceptions in C++ Code Nov 22, 2023 pm 02:38 PM

In C++ development, null pointer exception is a common error, which often occurs when the pointer is not initialized or is continued to be used after being released. Null pointer exceptions not only cause program crashes, but may also cause security vulnerabilities, so special attention is required. This article will explain how to avoid null pointer exceptions in C++ code. Initializing pointer variables Pointers in C++ must be initialized before use. If not initialized, the pointer will point to a random memory address, which may cause a Null Pointer Exception. To initialize a pointer, point it to an

How to start a live broadcast on Douyin for the first time? What should you pay attention to when broadcasting live for the first time? How to start a live broadcast on Douyin for the first time? What should you pay attention to when broadcasting live for the first time? Mar 22, 2024 pm 04:10 PM

With the rise of short video platforms, Douyin has become an indispensable part of many people's daily lives. Live broadcasting on Douyin and interacting with fans are the dreams of many users. So, how do you start a live broadcast on Douyin for the first time? 1. How to start a live broadcast on Douyin for the first time? 1. Preparation To start live broadcast, you first need to ensure that your Douyin account has completed real-name authentication. You can find the real-name authentication tutorial in "Me" -> "Settings" -> "Account and Security" in the Douyin APP. After completing the real-name authentication, you can meet the live broadcast conditions and start live broadcast on the Douyin platform. 2. Apply for live broadcast permission. After meeting the live broadcast conditions, you need to apply for live broadcast permission. Open Douyin APP, click "Me"->"Creator Center"->"Direct

Steps and precautions for using localstorage to store data Steps and precautions for using localstorage to store data Jan 11, 2024 pm 04:51 PM

Steps and precautions for using localStorage to store data This article mainly introduces how to use localStorage to store data and provides relevant code examples. LocalStorage is a way of storing data in the browser that keeps the data local to the user's computer without going through a server. The following are the steps and things to pay attention to when using localStorage to store data. Step 1: Check whether the browser supports LocalStorage

Steps and precautions for installing pip without network Steps and precautions for installing pip without network Jan 18, 2024 am 10:02 AM

Methods and precautions for installing pip in an offline environment. Installing pip becomes a challenge in an offline environment where the network is not smooth. In this article, we will introduce several methods of installing pip in an offline environment and provide specific code examples. Method 1: Use the offline installation package. In an environment that can connect to the Internet, use the following command to download the pip installation package from the official source: pipdownloadpip This command will automatically download pip and its dependent packages from the official source and save it in the current directory. Move the downloaded compressed package to a remote location

Python Development Notes: Avoid Common Memory Leak Problems Python Development Notes: Avoid Common Memory Leak Problems Nov 22, 2023 pm 01:43 PM

As a high-level programming language, Python is becoming more and more popular among developers due to its advantages of being easy to learn, easy to use, and highly efficient in development. However, due to the way its garbage collection mechanism is implemented, Python is prone to memory leaks when dealing with large amounts of memory. This article will introduce the things you need to pay attention to during Python development from three aspects: common memory leak problems, causes of problems, and methods to avoid memory leaks. 1. Common memory leak problems: Memory leaks refer to the inability to release the memory space allocated by the program during operation.

Frequently Asked Questions and Notes: Using MyBatis for Batch Query Frequently Asked Questions and Notes: Using MyBatis for Batch Query Feb 19, 2024 pm 12:30 PM

Notes and FAQs on MyBatis batch query statements Introduction MyBatis is an excellent persistence layer framework that supports flexible and efficient database operations. Among them, batch query is a common requirement. By querying multiple pieces of data at one time, the overhead of database connection and SQL execution can be reduced, and the performance of the system can be improved. This article will introduce some precautions and common problems with MyBatis batch query statements, and provide specific code examples. Hope this can provide some help to developers. Things to note when using M

Steps and points for correctly installing and using pip in a Linux environment Steps and points for correctly installing and using pip in a Linux environment Jan 17, 2024 am 09:31 AM

The installation steps and precautions of pip in the Linux environment Title: The installation steps and precautions of pip in the Linux environment When developing Python, we often need to use third-party libraries to increase the functionality of the program. As a standard package management tool for Python, pip can easily install, upgrade and manage these third-party libraries. This article will introduce the steps to install pip in a Linux environment, and provide some precautions and specific code examples for reference. 1. Install pip to check the Python version

See all articles