Home المنتديات CSS Intro Course Lesson 4 : selectors

Lesson 4 : selectors

  • #7580
    Abdullah Al-Naggar
    مشارك

    how to solve it
    HTML file:-
    <!doctype
    <html>

    <head>
    <link rel=”stylesheet” href=”src/css/style.css” />
    </head>

    <body>

    <div class=”example”>Class example</div>

    <h1>Welcome to my website</h1>

    <p class=”example”>Lorem Ipsum is simply dummy text of the printing and typesetting industry. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

    <div id=”example”>ID example</div>

    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

    offical logo
    <br>offical logo
    </body>

    </html>

    CSS file:-
    div {
    padding: 5px;
    }

    /* Write down class selector below */
    .example {
    color: red;
    }
    .h1{font-family:Arial;}

    /* Write down id selector below */
    #example {
    color:yellowgreen ;
    }
    .img{border: 20px;
    border-color: tomato;}

    p{font-family: Verdana;
    font-size: 10px;
    color:orange;}}

    Attachments:
    You must be logged in to view attached files.
    #7582
    Abdullah Al-Naggar
    مشارك

    I got the solution
    i shouldn’t write many code lines

    The CSS file should be like that:-

    div {
    padding: 5px;
    }

    /* Write down class selector below */
    .example{color:red;}

    /* Write down id selector below */
    #example{color:green;}

  • يجب تسجيل الدخول للرد على هذا الموضوع.

الإحصائيات

  • 11٬139 المستخدمون المسجلون
  • 16 المنتديات
  • 16 المواضيع
  • 20 الردود

أحدث الردود

احدث االأخبار

الابتكار والتعلم