HTML Learning Note CSS Learning selector case Section fifth (original) Reference use table

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Title</title>    <Linkrel= "stylesheet"href= "Tzy.css"type= "Text/css">    <styletype= "Text/css">[title]{            /*Property Selector*/Color:Brown;        }[Title=te]{            /*Property Selector Add value selector*/Color:Cadetblue;        }    </style></Head><Body><H1>the style sheet is applied</H1><H2>Style 2</H2><H3>Style 3</H3><P><Strong>This style references the strong derived selector</Strong></P><ul>    <Li>        <Strong>This will be selected by the Li strong derivation selector</Strong>    </Li></ul><DivID= "pid"><P>This will refer to the ID selector</P></Div><PID= "PPD">This will use the ID selector.<ahref= "Http://www.baidu.com">This will use the derived selector</a></P><Pclass= "Pclass">This will refer to the class selector</P><Pclass= "Pclass">This will use the class selector<ahref= "Http://www.baidu.com">This will use the derived selector</a></P><Ptitle= "P">Property selector refers to a value that can be arbitrarily written</P><Ptitle= "TE">The property selector refers to a selector that does not indicate a value if it is written differently than the specified value</P><Ptitle= "Te1">The property selector refers to a selector that does not indicate a value if it is written differently than the specified value</P><PID= "P1">Save Private Ryan .<span>White Snake Biography<span>Declaration of Independence</span></span></P><P>Save the soldiers.<span>White Snake Biography<span>Big belly.</span></span></P></Body></HTML>
h2,h1{/*Selector Grouping*/Color:Blue;font-family:italics;font-size:50px;}Body{/*If no style is defined, it will refer to the body style (which can be understood as inheritance) .*/Color:Aqua;}Li Strong{/*Derived selectors*/Color:Bisque;}Strong{/*Derived selectors*/Color:#FF00FF;}p span span{/*Derived selectors*/font-family:"in italics";}#p{/*ID selector using #*/Color:Aquamarine;}#ppd a{/*the ID selector and the derived selector work together*/Color:Blueviolet;}. Pclass{/*class selector. Using*/Color:Darkgreen;}. Pclass a{/*class selector with derived selectors*/Color:Blue;}

HTML Learning Note CSS Learning selector case Section fifth (original) Reference use table

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.