471,627 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Why I Seldom ASK

I browse the internet looking for help, but all I do is read it, and try to figure it out by my own pitiful, worthless, uneducated self. Why? Because of the following link to one of your pages found in my recent search:

http://www.thescripts.com/forum/thread664634.html

The responses to this person's post - calling them a "troll" for daring to ask the question at more than one forum, and with strong sneering insinuation calling them retarded and stupid and lazy and uneducated for not learning on their own all by themselves pretty much sums it up.

I was looking for info on exactly what they were asking. And I didn't get it here. Why?: Because every single answer to that post ridiculed. I am trying to find out why the ending tags are now written as <br /> instead of </br> which may not show up in this sentence if this posting form allows html codes, and I am too stupid to figure it out. So, in case it doesn't show up, I am talking about a left arrow bracket followed by "br" or "div" etc., followed by a space then a forward slash then a right arrow bracket. It used to be a left arrow bracket, followed by a forward slash then the "br" then the right arrow bracket.

Why the change. I gathered by the mean replies above that it has something to do with XHTML and that it is scorned. And yet, I see it in every code I look at now. Oh and by the way, I suppose I should GET OFF THE WWW because OBVIOUSLY the WWW was created ONLY for NERDS and GEEKS and the rest of us can just head south, we have NO RIGHT to try to be creative with our own stuff because EVERYONE KNOWS ONLY CORPORATE AMERICA gets to own the WWW and the DATA and ENTERTAINMENT and the CONTENT provide therein, including the MEANS to create that content, right?
Sep 9 '07 #1
6 1248
drhowarddrfine
7,435 Expert 4TB
Because of the following link to one of your pages found in my recent search:
Sorry for the misunderstanding but you are blaming the wrong people. That forum is a link to the USENET group 'comp.*' and not posts on "TheScripts" forum. I am responding quickly but haven't read that thread. In any case, you wouldn't find such a rude response here.
Sep 9 '07 #2
drhowarddrfine
7,435 Expert 4TB
The <br> tag was changed to <br /> because xhtml is a reformulation of xml. In xml, all elements are required to be closed. <br /> is a self-closing tag, meaning there is no closing tag because it takes no attributes and contains no other elements.

If you ever see it in html, it is incorrect usage. If you ever see <br> in xhtml, that is also incorrect usage. However, most people who write xhtml markup are actually serving it as html. Using xhtml syntax does not mean anything if the server is set to serve "text/html" and, in most cases, the coder is unaware it is or can't change it because his host won't let him.

For that reason, <br> will work in their xhtml because the browser thinks it IS html. In addition, browser are required to make the best of markup served them. So, if the browser see <br /> in html, it makes the best of it and guesses at what the author wanted.
Sep 9 '07 #3
The <br> tag was changed to <br /> because xhtml is a reformulation of xml. In xml, all elements are required to be closed. <br /> is a self-closing tag, meaning there is no closing tag because it takes no attributes and contains no other elements.

If you ever see it in html, it is incorrect usage. If you ever see <br> in xhtml, that is also incorrect usage. However, most people who write xhtml markup are actually serving it as html. Using xhtml syntax does not mean anything if the server is set to serve "text/html" and, in most cases, the coder is unaware it is or can't change it because his host won't let him.

For that reason, <br> will work in their xhtml because the browser thinks it IS html. In addition, browser are required to make the best of markup served them. So, if the browser see <br /> in html, it makes the best of it and guesses at what the author wanted.
Thanks. That was informative and I consider myself fairly knowledgeable about this stuff. I have a follow up question, though, if the server sends "text/html" but the document's doctype is defined as XHTML, doesn't the doctype override the "text/html"? It's my thinking -- and correct me if I'm wrong -- that the "text/html" sent just tells the browser the underlying type so that it knows which program should interpret what follows and that once it's received, the program (in this case the browser) will interpret according to the document's internal structure.
Sep 10 '07 #4
drhowarddrfine
7,435 Expert 4TB
The http header overrides all and the browser will ignore the doctype after receiving the http "content-type".
Sep 10 '07 #5
The http header overrides all and the browser will ignore the doctype after receiving the http "content-type".
Interesting. I didn't know that. Thanks. I wonder if there are any browsers where that doesn't hold.
Sep 10 '07 #6
drhowarddrfine
7,435 Expert 4TB
I believe it's in the http spec so they shouldn't.
Sep 11 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

36 posts views Thread by Antoon Pardon | last post: by
25 posts views Thread by Digital Puer | last post: by
136 posts views Thread by Matt Kruse | last post: by
15 posts views Thread by jiverbean | last post: by
57 posts views Thread by Eric Boutin | last post: by
23 posts views Thread by VB Programmer | last post: by
2 posts views Thread by Z D | last post: by
115 posts views Thread by LurfysMa | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.