Hey everyone, would any of you happen to know where I can find the basic rules for XHTML? I have one in particular (that, if could be solved here too would be very helpful) concerning text. Text must always, always be placed either within a paragraph tag, a span tag (even if the span is empty aka no attributes?), an li, or a heading (h1, h2). Do links have to be between paragraphs? Is what I just stated there not true, or must I wrap everything with - for example - the paragraph tag? And where would I find this, say on the w3c webpage, and other in-text standards (i.e. [br /] and such for ... I forget what they're called, sorry, but elements or attributes that don't have a start and an end)? Thank you!
I remember the good ole days of learning HTML. Go to w3.org It is VERY helpful! That is how I got through my high school class. And links can be within <p></p> For example, <p><a href="http://link.com">Link</a></p> is valid. post more if u have any more questions
Hi! For learning HTML you can go here => http://www.w3schools.com/html/default.asp For XHTML visit this => http://www.w3schools.com/xhtml/default.asp The self closable tags are <br /> <img /> <input /> <link /> <hr /> HTML: etc The basic rules for XHTML is that it is strict like XML. Means all the tags must be properly closed. You can not close one tag before another... For example <p>This is a <a href="#">LINK</p></a> HTML: is wrong... Following is right: <p>This is a <a href="#">LINK</a></p> HTML: And yaa, for valid XHTML, < a > needs to be inside < p > tag!
W3C XHTML 1.0 page -- recommendation. W3C description of XHTML elements & attributes Problems serving XHTML correctly -- IMPORTANT READ. James
None of these answered my question (edit: actually swashata did confirm that links must be within a paragraph tag, but of course I am asking if you can use other tags/if there is an official list). To clarify what I am asking: MUST text ALWAYS be inbetween a paragraph tag of some sort? According to the standard, is it not WRONG to say, [div]text text text[/div] without enclosing the text inside a paragraph, or inside a span? I know that it is wrong, so that question is already answered. So then, what must text be enclosed with? I was wondering if there was an official list somewhere.
Gobal structure of an HTML document -- applies alike to HTML 4.01 and XHTML 1.0. Index of Elements Index of Attributes James
<div></div> is supposed to be inside of a paragraph tag, it just specifies a certain style. so yes, they do have to be in < p > < / p >
while greatly appreciated, these are also not of help They mention everything except text as far as I can tell. For the latest reply: I don't think every div needs to be inside a paragraph... Anyway, I guess all text must be in a paragraph, even if it is a link (a)? Does an image in a div have to be inside a paragraph? Does this never annoy anyone - i.e. does everyone set their paragraphs to be inline?... Why does no one really seem to get what I mean? I thought there was a standard for this...
Now how come a div tag be inside a p tag! div [division] are box models, which may contain texts wrapped inside p tags.