0
Q:

align center html

<!-- Code by Scratchy -->
<!-- Twitter: @S_cratchy-->

<!-- Solution 1 -->
<p>
  This is some cool text in html, wow such cool text
</p>

<!-- Solution 2 -->
<font style="text-align:right;"> This text is on the right</font>
<font style="text-align:center;"> This text is in the center</font>
<font style="text-align:left;"> This text is on the left</font>
2
<tag class="" align='center'></tag>
2
<center>
	<p>This is centered</p>
</center>
3
To text align all yuo have to do this:
<style>
  .yournameforclass {
    background: #fff; //which does not have to be there
    text-align: center;
    width: 100%;  //all of this can be varied. Text align can be used in these forms: left, which is to the left, right, to the right of the screen
    height: 300px;
  }
1
<style>
  element
  {
    text-align: center;
  }
</style>
-------------------------------------------------------------------------------
style.css
element
{
	text-align: center;
}
0
.headerTwoDiv{
			margin:1% auto;
			margin-right: auto; margin-left: auto; width: 21%; 
			padding-top: 11px;
		}
0

    <html>
<head>
<style>
h1 {text-align: center;}
p {text-align: 
    center;}
</style>
</head>
<body>

<h1>This is a 
    heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
 
-1
<!-- use the center tag -->
<center>
  <!-- your code -->
</center>
-1

New to Communities?

Join the community