CSS
Cascading Style Sheet
- It's a simple Mechanism for Adding Styles to Webpages.
- CSS Specifications are maintain by W3Consertium.
CSS has Simple Syntax
Selector{Property:Value}
- Selector:-
- What HTML tag(s) does the Property apply to
- eg:- <body><h1><p>
- Property:-
- The Style That We are going to Add
- eg:- background-color , text-align
- Value:-
- Varities of a Style
- eg:- background-color-:red
We Can Write CSS Coding In Three Ways...
- INLINE
- We can write CSS Simply into the element tags using 'style' called INLINE CSS.
- <h1 style="text-align:center;">
- INTERNEL
- In Internel CSS Coding will be written in the 'head' part of HTML using 'style tag'.
- <html>
<head>
<style>
h4{
background-color:blue;
}
</style>
</head>
<body>
<h4>My First CSS</h4>
</body>
</html>
3.EXTERNEL
- An external style sheet is a separate file where you can declare all the styles that you want to use on your website.
- There are 2 main things we have to do in External Style Sheet.
Creating External Style Sheet...
- Open A normal Text Editor.
- Type CSS code into a plain text file, and save with an extension of .css
Sample CSS Document
|
In CSS, selectors are used to select the element(s) you want to style.
- id Selector
- In CSS
- #intro{}
- In HTML
- <p id="intro">
- class Selector
- In CSS
- .intr0{}
- In HTML
- <p class="intro">
If you want to change anything, you only need to update the external style sheet.
CSS + HTML...
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeletePython Training in electronic city
DataScience with Python Training in electronic city
AWS Training in electronic city
Big Data Hadoop Training in electronic city
Devops Training in electronic city
React JS Training in electronic city