<html>
    <
head
>
        <
style
type=text/css>
            body {
                background-color : #f7f7f7;
            }
            #sample1 {
                border-collapse : collapse;
                width : 510px;
                background-color : #fff;
                border-left : 1px solid #000;
                border-right : 1px solid #000;
            }
            #sample1 td {
                padding : 5px;
            }

            #sample2 {
                margin : auto; padding : 5px;
                width : 500px;
                background : #fff;
                border-left : 1px solid #000;
                border-right : 1px solid #000;
            }
        </style>
    </
head
>

    <body>

        <!– Method 1: Using tables –>
       
<table id=sample1align=center>
            <
tr
>
                <
td>
Sample text</td>
            </
tr
>
        </
table
>

        <hr />

        <!– Method 2: Using divs –>
       
<div id=sample2>
            Sample text
       
</div>

    </body>
</
html>