Align="center" not working

css, html

Solution

Use the `style` attribute inside your paragraph:

`<p style="text-align: center;">Hello world!</p>`

the `<font>` tag has been deprecated for quite some time. Other answers are also suggesting the `<center>` tag, however, this is also deprecated. (so is the `<align>` tag.)

NOTE: You forgot to open your `<p>` tag.

Problem

Is there better ways to center an object by HTML other than align=""? Align doesn't always work. Are there other tags that can help with this? ``` <html> <font align="center" size="45"> Hello World </p> </html> ``` This code would not align the font tag in the center. I know there are ways with CSS but are there any other ways in HTML

Original source