+ 1
What is the use of div tag?
3 ответов
+ 7
it defines a section in an html document
+ 5
@2_3rr0r5, The <div> tag is not a rectangle, it only took the shape of the document.
   refer to svg/canvas[rect].
0
The "div" tag creates a division, which is a rectangle you can resize by using width and height, add border, padding, margin and all style you want. It'll be refered to only that division...
@Nomeh Uchenna Gabriel
take it easy, it was just to make him understand. normally, if you add a border it's drawn as a rectangle containing something, that's all!
<!DOCTYPE html5>
<html lang="en">
  <head>
    <title>
      Div representation
    </title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      div
      {
        border-style:solid;
        border-color: red;
        padding: 30px;
        width:200;
        background-color: black;
        color:white;
      }
    </style>
  </head>
  <body style="background-color:blue;">
    <div>
      This is a div, don't you see a rectangle?
    </div>
  </body>
</html>






