Pages

Friday, September 6, 2019

how to use css explain with example

What is Css ?

Css Stands for Cascading Style Sheet with the use of design your web page.

There are main three types of Css: 
  1.  Inline Css
  2.  Internal Css
  3.  External Css
1) Inline Css:
       Inline Css it's use in the html tag with use of style attribute.
Example:
Output:
how to use css explain with example

2)Internal Css:
        Internal css used in html <head> tag using <style>..</style>  and your html tag find
        using Class or id.
        If you use class than called css using (.) and If you used id than called css using #

Syntax:
Example: 
Output:
how to use css explain with example

3)External Css:

       If you use External Css than create .css file and your css file link to the html file using <link>
       tag.

       In <link> tag link your css file using href attribute or if your css file and html file in same
       directory than you write in href like (href="cssfilename.css")  and your html file and css file is
       not same directory than you write full path of your css file in href like
       (href="D:\css\external.css").

Example:
external_css.html:
hello external.css:
Output:
how to use css explain with example

Share:

0 Comments:

Post a Comment