Posts

Showing posts with the label HTML5

how to use div tag in html and css with examples

Image
  Tamizh Tech Tutorial ................ div tag div stands for division and it is a type of container tag  It is mainly used to create a division or section in HTML page It is styled easily by using its tagname or class or id attribute. Syntax     <div>          </div> I. EXAMPLE OF CREATING RECTANGULAR SHAPE USING <DIV> TAG NOTE In order to create a square shape, the height and width attributes should be equal size. 1. SOURCE CODE <html>     <head>         <title>TODO supply a title</title>         <style>             div             {                 border: 4px double black;                 width: 300px;                 height:300px;                 padding:9px;                 background-color: #6639b7;                 color:white;                 border-radius: 5px;             }             p             {                 font-size: 21px;             }         </style>     </head>     <body>         <div>