CSS-Selectors (tag Selector, class selector, ID selector)

Source: Internet
Author: User

Title
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" ><html><head>    <meta http-equiv="Content-type" Content="text/html; Charset=utf-8 ">    <title>CSS Selector</title>    <!--CSS selector type: Tag Selector, class selector, ID selector --    <style type="Text/css">        / * Tag Selector * /        P{  color:red; }        Li{  font-size:px; }        / * Class selector * /        . DB{  font-size:px;         color:blue; }        / * ID selector * /        #welcome{  font-weight: bold;         text-decoration: underline; }        / * Composite selector * /        Li. Itany{  font-size:px;         color:yellow; }        Li#wbs{  font-family: bold  ;         color:pink; }        / * Nested selector * /        P span{  font-size:px;         color:#ff7300; }        P span#huogai{  color:green; }        / * Collective statement * /        P,P span#huogai{  font-size:px; }    </style></head><body>    <p id="Welcome">Hello, welcome to visit your U.S. mall!<span id="Huogai">It's not normal.</span></P>    <ul>        <li class="db">Household appliances</li>        <li>Everybody electric</li>        <li>Everybody electric</li>        <li>Everybody electric</li>        <li class="Itany">Everyone electricity</li>        <li>Everyone electricity</li>        <li>Everyone electricity</li>        <li>Everyone electricity</li>        <li>Everybody electric</li>        <li>Everybody electric</li>    </ul>    <span>I deserved it.</span>    <ul>        <li class="db">Daily Necessities</li>        <li>Detergent</li>        <li>Detergent</li>        <li>Detergent</li>        <li id="WBS">Detergent</li>        <li>Detergent</li>        <li>Detergent</li>        <li>Detergent</li>        <li>Detergent</li>        <li>Detergent</li>        <li>Detergent</li>    </ul>    <p>Hehe, you deserve to learn not!<span>Deserve</span></P></body></html>

CSS-Selectors (tag Selector, class selector, ID selector)

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.