+ 2
How to centre text ????????????[SOLVED]
13 ответов
+ 9
Use css property
text-align: center;
+ 8
<h1 align = "center"> Anand Raj <h1>
+ 6
<center> i am centered </center>
+ 6
Anand Raj why "without CSS"?
CSS is the right way: you cannot arg to make web pages without using it nowadays... in fact, <center> is no more part of html since html4: it was deprecated in favor of css 'text-align' to make structure and style much more well organized ^^
from mdn: "Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time."
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center
+ 5
There is center tag you can use that
+ 4
<center> I am in center of the webpage </center>
======================
<div align="center"> Am in center </div>
=====================
<div style="text-align: center"> Am also in center </div>
=========================
Using CSS.....
<style>
.center{
text-align: center;
}
#center{
text-align: center;
}
</style>
<div class="center"> Am in center </div>
<div id = "center"> Am also in center </div>
^ = ^
Enjoy
+ 3
in html bro with out CSS
+ 3
Tharul Nejana as <center> all html features related to styling have been deprecated... you should use css to style element, not attributes... only exception would be the 'style' element wich allow a quick inline-styling, but recommend way iscto use external css files with selectors and rules ^^
+ 1
centre tag doesn't work
- 2
For HTML,
Use:
<center> i am centered </center>
For CSS
Use this css property
text-align: center;
- 2
<!—Method 1–>
<h1 align=center>Center Text</h1>
<!—Method 2–>
<center>Center Text</center>
- 4
U can use <center></center> dude