Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

align div in html

<!DOCTYPE html>
<html>
  
<head>
    <title>gfg</title>
    <style type=text/css>
        p {
            background-color: gray;
            margin: 10px;
        }
          
        div {
            color: white;
            background-color: 009900;
            margin: 2px;
            font-size: 25px;
        }
          
        body {
            text-align: center;
        }
    </style>
  
</head>
  
<body>
    <h1>GeeksForGeeks</h1>
    <h2><div>align Attribute</h2>
    <div align="center"> 
      div align="center"
  </div>
    <div align="left">
      div align="left" 
  </div>
    <div align="right">
      div align="right" 
  </div>
    <div align="justify">
      div align="justify" 
  </div>
  
</body>
  
</html>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #align #div #html
ADD COMMENT
Topic
Name
6+1 =