Click to See Complete Forum and Search --> : Is that useful to use this attributes?


Creative
02-17-2006, 05:45 AM
Hello everybody,
I think that this is the first time for me to write a post in this section ^_^

I need your answer please

1- I saw in some scripts this:
<p style="margin-top: 0; margin-bottom: 0">

what the advantege of this attributes: "style="margin-top: 0; margin-bottom: 0""
what id do?
they put it in every <p> tag!!
Is that useful?

2- I also saw this:
<td><div align="center">text</div></td>
or
<td><p align="center">text</p></td>

why did they put <div> or <p>
I think it's better to be like this:
<td align="center">text</td>

what is the right? My code or their code???


3- I saw this also:
<div align="center">
<center>
some tags here
</center>
</div>

why did they put a two Tags for align the text??
and if it's wrong.. what is the right tag to put: <center> or <div align="center">?


and big thanx for you

thanx in advance :)


"Creative"

Fang
02-17-2006, 06:58 AM
1. Removes the margin/gap of the <p> element.

2. The element in the <td> can aid in breaking long lines. Plain text within a <td> is not always wrapped.

3. Same as above.

Both methods of centering are invalid when using html 4 strict DTD, use css.

NogDog
02-17-2006, 11:32 AM
Aslo note that there is a lot of poor and often invalid HTML mark-up out there on the internet. Do not assume that any HTML you see out there is correct, proper, or the best way to do it. If you see a page with code that looks strange, try submitting it to the HTML Validator (http://validator.w3.org/) first to see if it's even valid before analyzing whether it is something you should learn more about.