1. CSS annotation format /**/.
2. Pseudo-classes
(1) The pseudo class must be written at the end of the element selector.
(2) pseudo-Class A Sequence
A: Link
A: visited
A: hover
A: active
That is, love hate)
3. Several Basic HTML tags
For more information, see here.
DTD: Specify the XHTML 1.0 DTD in which the tag is allowed. S = strict, t = transitional, F = frameset.
<! Doctype> define the document type. STF
<HTML> define an HTML document. STF
<Body> define the subject of the document. STF
<H1> to <H6> defines the HTML title. STF
<P> define a paragraph. STF
<Br> define simple lines. STF
<HR> define a horizontal line. STF
<! --... --> Define comments. STF
<B> define bold text. STF
<I> define italic text. STF
<Em> the definition emphasizes the text. STF
<Big> define large text. STF
<Strong> the definition of text is more intense. STF
<Small> defines the small text. STF
<Sup> defines the upper-level text. STF
<Sub> define subscript text. STF
<BDO> defines the direction of the text. STF
<U> I do not agree to use it. Defines the underline text. TF
<PRE> define pre-formatted text STF
<Code> define a computerCodeText. STF
<Acronym> defines the abbreviation of the first letter. STF
<Abbr> define the abbreviation. STF
<Address> define the contact information of the Document Author or owner. STF
<BLOCKQUOTE> define block references. STF
<Q> define short references. STF
<Cite> Define reference (citation ). STF
<Ins> defines the inserted text. STF
<Del> defines the deleted text. STF
4. selection rules: Computing Features
Based on their feature levels, a style sheet can also go beyond the conflicting style sheet. A high-characteristic style always prevails over a style with a low feature. This is just a statistical game that calculates the specified number of selector.
- In the statistics SelectorIDNumber of attributes.
- In the statistics SelectorClassNumber of attributes.
- The HTML Tag Name format in the statistics selector.
Finally, write three numbers in the correct order. Do not add spaces or commas to get a three-digit number. (Note: You need to convert the number into a larger number ending with three digits .) The final number list corresponding to the selector can easily determine that a higher number is superior to a lower number. The following is a list of feature-specific delimiters:
# Id1 {XXX}/* A = 1 B = 0 C = 0 -->Feature = 100 */
Ul ul Li. Red {XXX}/* A = 0 B = 1 c = 3 -->Feature = 013 */
Li. Red {XXX}/* A = 0 B = 1 c = 1 -->Feature = 011 */
Li {XXX}/* A = 0 B = 0 C = 1 -->Feature = 001 */
5. Save the file encoding format
It is best to unify the encoding formats of HTML, CSS, and JavaScript files. You must specify a proper format if it is not uniform.
Encoding specified by HTML:
<Head>
<MetaHTTP-equiv = "Content-Type"Content= "Text/Html;Charset = gb2312 "/>
<Title>Demo</Title>
<LinkHref = "/demo. CSS"Rel =" stylesheet "type =" text/CSS">
Call the JS file:
<Script SRC= "/XX. js" Type= "Text/JavaScript" Encoding= "UTF-8"> </Script>
Declare the encoding in the CSS file:
@ Charset "UTF-8 ";