Wondering what are div tags? If now..I will explain you now..
In a particular code we might want some texts to blue and the rest to be black...now to solve this problem we will use the <div></div> tags... Lets see an example...
<html>
<head>
</head>
<body>
<p>This is an example for <div> tag
<div style="color:#0000FF">
<h3>This text is in a different color</h3>
</div>
<div style="color:red">
</html>
Now the result of the code must be somewhat like this :-
OK now you can see that all the three lines are in different colors..This is just the basic feature of the div tag...All the websites you see are made up of this div tag....
Now lets study about this code:-
In a particular code we might want some texts to blue and the rest to be black...now to solve this problem we will use the <div></div> tags... Lets see an example...
<html>
<head>
</head>
<body>
<p>This is an example for <div> tag
<div style="color:#0000FF">
<h3>This text is in a different color</h3>
</div>
<div style="color:red">
<p>This is in another color.</p>
</div>
<body></div>
</html>
Now the result of the code must be somewhat like this :-
OK now you can see that all the three lines are in different colors..This is just the basic feature of the div tag...All the websites you see are made up of this div tag....
Now lets study about this code:-
The <div> tag defines a division or a section in an HTML document.
The <div> tag is used to group block-elements to format them with CSS.
So now you know what is a div tag..keep practicing and get ready for the upcoming contest in June...bring more people here so that there may be a tough competition...
Comments
Post a Comment