Align title to the center : Title section : CSS Controls HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Controls » Title section »

 

Align title to the center


 



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title></title>
  <style type="text/css" media="screen">
  div {
    margin: 30px;
    padding: 30px;
    border: 1px solid #ccc;
    font-size: small;
  }
  #divID {
    line-height: 1.5em;
    text-align: justify;
  }
  
  #divID h1 {
    letter-spacing: 4px;
    font-style: italic;
    text-align: center;
  }
  
  #divID .drop {
    float: left;
      font-size: 400%;
      line-height: 1em;
      margin: 4px 10px 10px 0;
      padding: 4px 10px;
      border: 2px solid #ccc;
      background: #eee;
    }
  
  </style>
</head>

<body>

<div id="divID">
<h1>This is the header</h1>

<p><span class="drop">T</span>his is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
</p>

<p>This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
This is a test. This is a test. This is a test. 
</p>

</div>

</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Controls
» Title section