# How to center text in HTML?

HTMLJavascriptProgramming Scripts

The HTML <center> tag is used for centering the content enclosed with this tag.

Note − This tag is now deprecated.

## Example

You can try to run the following code to center text in HTML −

<!DOCTYPE html>
<html>
</html>