0

i didn't see any html forums so I'm posting this here... what should we use in place of the align tag since it has been deprecated?

i know it has been replaced with css, so how would i convert the following two tags?
<p align="center"> </p>
<td align="center"> </td>

3
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by steveneven
0

i didn't see any html forums so I'm posting this here... what should we use in place of the align tag since it has been deprecated?

i know it has been replaced with css, so how would i convert the following two tags?
<p align="center"> </p>
<td align="center"> </td>

You mean like this example?

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

or

<table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
	<td>&nbsp;</td>
  </tr>
</table>

:?:

0

Maybe you just need to be alittle more specific. I dunno, its probly just me without coffee today. LOL, let me get some real quick!

0

well sort of, but the align tag has been deprecated... which means your no longer supposed to be usign it
align <-- cancelled, deleted, removed from HTML 4 (granted browsers still maintain backwards compatibility but nonetheless)

I want to know how to replace the align tag with css which is what they tell you to replace it with.

0

CSS replacement for the depreciated align tag is text-align

text align in CSS

<div style="text-align: center;"> your text</div>

image align in CSS

<div style="text-align: center;"> <img src="imagename.extention"/></div>

table as mikeSQL said:

<table align="center" width="50%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

Not sure if there is another way of doing this.

SE (Dave)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.