Lets see few examples for block level tags
DIV Tag
Div is highly usable tag in web development it help us organize the data in proper way.
If you want to display the data in new line and you want to occupy complete width then use div tag.
Create a file called divexample.html and copy the below lines into file and run this in a browser.
<html>
<head>
</head>
<body>
<div>Welcome to helpinterview.com. This website helps you to improve your programming skills.</div>
</body>
</html>
Following will be the output
In the above example we are not sure whether is it occupied full width or not. How do we find that? I added the new attribute called style in div tag. Execute the below program and check the results
<html>
<head>
</head>
<body>
<div style="border:1px SOLID #ddd">Welcome to helpinterview.com. This website helps you to improve your programming skills.</div>
</body>
</html>
You get the below result. DIV element surrounded by border which shows that it occupies full width.