Help - Search - Members - Calendar
Full Version: Tag, Html, CSS Questions
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
emberfly
ok.. I've always been taught to use
CODE
<BR>


but ever since I started making Xanga layouts, I've seen some people use

CODE
<BR />


Wthell is the point in that? Why not just use the first one?


Also, I was reading this:
http://line25.com/articles/10-html-tag-cri...shouldnt-commit

and I have some questions.

........




on all of them actually blink.gif

except the last one. That one is obvious.

thumbsup.gif
tcunningham
He explained each one, in pretty good detail below the examples. You should use <br /> in XHTML, becuase it needs to have the closing tag, in HTML, there is no need for <br> to have a closing tag. It's just the difference between HTML, and XHTML.
emberfly
Oh. Yes, I know he wrote stuff under each one, but he didn't explain WHY we should be doing this :P or why it's better than the other way.
tcunningham
summary: there's a time and place for everything. You're a grammar freak, so think of it as punctuation. coding can be the same way, there is a certain way that the markup should be written, you can't go willy-nilly putting whatever tags you want, and how you want them. It won't pass validation if you do that.
emberfly
What is this "validation" you speak of? ohmy.gif
tcunningham
http://validator.w3.org/ wink.gif
emberfly
Thank you, Thomas. biggrin.gif
fixtatik
Validation is technically a guideline. If a site works, it works. You might have some custom tags that won't pass W3C validation, but they'll work because you defined them on your own. Take a look at Myspace, for example. The site works, even with an average of over 100 errors on every page, some going beyond 300 errors.

The big thing to note on the difference between HTML and XHTML is the case-level. HTML tags can be either uppercase (<HTML>) or lowercase (<html>), but XHTML must always be lowercase.

The slash in <br /> is because it's an empty element, like <img /> or <link /> or <input />. Without the slash, it's like using <div> but never using </div>. That said, you can also use <br></br> or <img></img> and it will still validate.
emberfly
I never knew you had to close <br> tags O_o (or image tags)

oddddddd
Mike
This good for closing then?
emberfly
yes
Mike
Topic closed & moved.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.