Home > database >  how to adjust the text in the center of the website without using CSS
how to adjust the text in the center of the website without using CSS

Time:12-13

Actually I am trying to make a nice website but the challenge is I can't use CSS or JavaScript and Now I want to adjust the text at some point in the center.

With the help of the CSS can can do that but I don't know how to do that with HTML

CodePudding user response:

You can use Center Tag which is deprecated

<center>I would not recommend using deprecated tags</center>

CodePudding user response:

The align Attribute in HTML is used to specify the alignment of the text content of the element but it is only applicable for some specific elements rest are deprecated.

Read more here.

<div align="center"> Hello World </div>

CodePudding user response:

<center><p>Type what you want</p></center>

or you can use,

<p style="position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); padding-bottom: 50px;"></p>
  • Related