Introduction:
The HTML
The difference between the
Example:
The HTML
div tag is used for defining a section of your document. With the div
tag, you can group large sections of HTML elements together and format
them with CSS. For example, you could have your navigation section
wrapped in one div and your main content section in another div.The difference between the
div tag and the span tag is that the div tag is used with block-level elements whilst the span tag is used with inline elements.Example:
<html> <head> <title>HTML div Tag</title> </head> <body> <div style="background-color:orange;text-align:center"> <p>Navigation section</p> </div> <div style="border:1px solid black"> <p>Content section</p> </div> </body> </html>
0 comments :
Post a Comment