Question on the HTML 4.1 Center Tag

liunx

Guest
Okay..I have an image I wish to be centered on my page but I want to use the current and compliant HTML tag code for it...so would someone please be so kind as to tell me what the standard tag is?<br />
<br />
I used the HTML Kit and it used a align="middle" thing and I am unsure if that is right..I used the Invoke Tag thing..at any rate could someone tell me what the proper tag is? I know it is a painfully simple question but I am curious..thanks<!--content-->There is no proper tag. Tags are for marking up meaning. For presentation use CSS. Sometimes you can ge by with setting the margin to "auto", sometimes you have to set text-align to "center" in the containing block.<!--content-->CSS..yes I looked it up but I was unable to find what I needed to do that..I suppose for now I can use Dreamweavers tags, though they are deprecated I guess.<br />
<br />
Maybe I will see if I can use some other tagin HTML Kit because if I have it validated I don't wanna have a huge list of errors and junk.<br />
<br />
Man..I am just gonna have to get DreamWeaver MX next year as I hear the 2004 edition has been updated...thanks for the reply.<!--content-->What Charles means is...<br />
<br />
<br />
<div style="text-align:center;"><br />
<p>The text inside of here will be centered.</p><br />
</div><br />
<br />
<br />
[J]ona<!--content-->Okay..I think...thanks....;)<!--content-->Is there something else you're doing and need something else with? Charles hit the nail on the head with his statement:<br />
<br />
Originally posted by Charles <br />
Sometimes you can get by with setting the margin to "auto," sometimes you have to set text-align to "center" in the containing block.<br />
<br />
Whatever block-level element contains what you want to center is what should have its CSS updated. Not align="center" but style="text-align:center;" or you can set your CSS code in the head tag, and have all of the child elements of that particular type of element centered. Or you can even use an ID for a particular element, or you can even go as far as to set all of those particular elements that are inside of another type of element to centered. Pretty amazing, eh? You can't do that with HTML or XHTML. Most of my pages consist of very, very little code at all, other than text. The rest is a CSS document loaded in the head of the document.<br />
<br />
[J]ona<!--content-->
 
Back
Top