How to center a text into a div tag (with an id = htmlblock1)

How to center a text into a div tag (with an id = htmlblock1)

BY 10 Aug 2013 Web Application Development

Hello everyone,

I am trying to make my text centred within a div tag, I used this code:

 

<div id=”htmlblock1″ class=”” style=”text-align:center”>
          <!–HtmlCodeBlock-Start[#htmlblock1]–>
                    Here is my result
          <!–HtmlCodeBlock-End[#htmlblock1]–>
        </div>

But the text is still on left!

What’s my fault?

Written by