CSS Syntax
Introduction to CSS
CSS refers to the cascading sheet styles which is a new way to design web pages.It comes to great significance because of its portability.Those who are known to programming know that we can include or import files to our program.Using CSS we can import or link other cascading styles int our webpage without retyping the code.Its really useful when you design big webpages of thousands of lines of code.Before we learn all the properties of CSS we first must know its syntax.
CSS syntax
CSS is a styling way which means that is should start and end with some specific tag which would tell the browser that "hey!This part is for styling and don't display it".That specific tag is..
<style> :- start of style code
</style> :-end of style code
CSS syntax consists of 2 elements;- 1.CSS selector
2. Block of code
CSS selector is a tag which determines which element of the webpage is to be designed.
Block of cde determines which properties is to be applied to that element of webpage.
We'll study all properties one by one:-
Lets explore the block of code first:-
Block of code starts with the curly bracket { and ends with the curly bracket }
Inside the brackets, There are pairs of properties and their values.
Here is an short example:-
CSS code
HTML Code
Introduction to CSS
CSS refers to the cascading sheet styles which is a new way to design web pages.It comes to great significance because of its portability.Those who are known to programming know that we can include or import files to our program.Using CSS we can import or link other cascading styles int our webpage without retyping the code.Its really useful when you design big webpages of thousands of lines of code.Before we learn all the properties of CSS we first must know its syntax.
CSS syntax
CSS is a styling way which means that is should start and end with some specific tag which would tell the browser that "hey!This part is for styling and don't display it".That specific tag is..
<style> :- start of style code
</style> :-end of style code
CSS syntax consists of 2 elements;- 1.CSS selector
2. Block of code
CSS selector is a tag which determines which element of the webpage is to be designed.
Block of cde determines which properties is to be applied to that element of webpage.
We'll study all properties one by one:-
Lets explore the block of code first:-
Block of code starts with the curly bracket { and ends with the curly bracket }
Inside the brackets, There are pairs of properties and their values.
Here is an short example:-
CSS code
<style>
#my_test{
font-size:30px ;
text-decoration:underline ;
border:1px solid ;}
<style>
#my_test{
font-size:30px ;
text-decoration:underline ;
border:1px solid ;}
<style>
HTML Code
<div id="my_test">Here you'll see this paragraph different from the others displayed above.</div>
Comments
Post a Comment
Comment on articles for more info.