What is Css ?
Css Stands for Cascading Style Sheet with the use of design your web page.
There are main three types of Css:
- Inline Css
- Internal Css
- External Css
1) Inline Css:
Inline Css it's use in the html tag with use of style attribute.
Example:
Output:
2)Internal Css:
Internal css used in html <head> tag using <style>..</style> and your html tag find
using Class or id.
Example:
Output:
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: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:
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:
Output:
0 Comments:
Post a Comment