Search code examples
htmlalignment

HTML Para Alignment


I would like to align my text below. I need the formatting using HTML only (not CSS becuase the html code is inside a perl file, ok with in-line CSS).Can I do it by using the lines as table rows/columns and specifying the width of table to an y specific value which aligns the text?

Current format

September 19, 2014
Status of my report 

This message is being sent regularly to development managers and interested parties to report the   status of having proper headings in the code of products that we are releasing.

For details refer to  Headers page.

Desired format:

       September 19, 2014
       Status of my report 

       This message is being sent regularly to development managers and 
       interested parties to report the status of having proper headings 
       in the code of products that we are releasing.

       For details refer to  Headers page.

Solution

  • Without any CSS at all, the only way you can position text is by using a <pre> tag:

    <pre>
               September 19, 2014
               Status of my report 
    
               This message is being sent regularly to development managers and 
               interested parties to report the status of having proper headings 
               in the code of products that we are releasing.
    
               For details refer to  Headers page.
    </pre>

    If CSS is allowed, just set a width and margin on the paragraph:

    <p style="width:400px;margin:0 100px">...