There are two ways in which we can add css in our html .They are:-
Webtey VJ
- External
- Internal
First let us discuss internal
In order to insert css internally we use the style tag between the head tag .The style tag is an container tag.ie... <style></style>
Now it is upon you how you use the css inside in an example is shown here:-
<head>
<style>
#some selector{
text-align:left;
}
</style>
</head>
External
We use the following code in order to insert css in our html file.I have discussed the function of it below the code.
The code is:-
<link href="main.css" rel="stylesheet" type="text/css"/>
The above code is written inside the link tag.
href:-This stands for hyper referencing , gives the source code of your css file.
rel:- This gives the relation between the html file and the html file.
type;- This tells the browser which kind of file are you relating to the html file.
No comments:
Post a Comment