954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

html question

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?



paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 
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?


You mean like this example?
[PHP] [/PHP]

or

[PHP] 
[/PHP] :?:

mikeSQL
Junior Poster
196 posts since Dec 2004
Reputation Points: 16
Solved Threads: 3
 

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!

mikeSQL
Junior Poster
196 posts since Dec 2004
Reputation Points: 16
Solved Threads: 3
 

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.

paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 

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)

steveneven
Junior Poster
147 posts since Jan 2005
Reputation Points: 11
Solved Threads: 8
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You