What is CSS in HTML?
Web development is made up of three
elemental files that are the HTML file the CSS file and the JavaScript file. Cascading Style Sheets (CSS)
is Describes the HTML Document. CSS Handles the Web Page look and feel.CSS
Control HTML Element. CSS making sure how elements
look like on a certain web page example their colors the font etc.
There Are 3 Type of CSS
- Inline CSS
- Internal CSS
- External CSS
1) Inline CSS
Inline CSS is Used to insert style sheets in HTML
Element.
Example
- <html>
- <body>
- <p style=”color: red”>Hello Infodpsoft</p>
- </body>
- </html>
2) Internal CSS
Internal CSS is defined in <head> tag of HTML Page.Example
- <html>
- <head>
- <style>
- body
- {
- background-color: red;
- }
- p
- {
- color: white;
- }
- </style>
- </head>
- <body>
- <p>Hello Infodpsoft</p>
- </body>
- </html>
3) External CSS
External CSS is used External style Sheet. Define CSS link in Head Section of HTML<link rel=”stylesheet” type=”text/css” href=”Mycss.css” >
Example
- <html>
- <head>
- <link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
- </head>
- <body>
- <p>Hello Infodpsoft</p>
- </body>
- </html>
Example of CSS Properties.
- The Color Properties used To Change Text Color.
- The Font-size Properties used to Change Font-size.
- The CSS Margin Propertied used to margin outside to Object border.
- The CSS Padding Properties used to Padding Inside to Object border.
- The Border Properties used to Border around HTML element.
- The Text-alignment used to text
alignment ex: text left, text right, etc.
Other Blog
No comments: