| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Which one is more compatible in this context: <br>, <br/> or <br /> |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2008
Posts: 40
|
Which one is more compatible in this context: <br>, <br/> or <br />
I can't find a simple explanation for this question. I'm trying to write a code as compatible as possible. In the body of a website, inside this tag: HTML Code:
The code would be in HTML. Thanks. |
|
|
|
|
|
#2 (permalink) |
|
Limey
Join Date: Apr 2008
Location: Liverpool
Posts: 4,747
|
just adjust the paragraph tag so it has the extra space. Within your CSS add this: Code:
when of course the 20px you adjust according to the space you want. But to answer your question about the br tag, the best way is <br />. |
|
|
|
#4 (permalink) |
|
Graphic Motion Webdesign
Join Date: Sep 2007
Location: Belgium
Posts: 269
|
I always use <br> works for me... Dreamweaver uses <br> it its help explanation but added <br /> to my code... Its one of those tags that doesn't need to be closed. I guess that <br /> looks nicer to point that out in your code. |
|
|
|
#7 (permalink) | |
|
Whitey
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,324
|
Quote:
That's not necessarily true - as Rotuy said, it depends on your doctype. Using <br> in an XHTML document is invalid code, and using <br /> in an HTML document is invalid code. You should use the one that matches your doctype. And for the op - <br/> doesn't exist. But as Rotuy said, you should just add the space with CSS. |
|
|
|
|
#8 (permalink) |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
A line-break (which ever way you end up writing it) is not the correct element to use to achieve your goal. More space between paragraphs is a change in the visual style of your document, and as a result, should only ever be defined/created in a style sheet (as Rotuy said). |
|
|
|
#10 (permalink) | |
|
Registered User
Join Date: May 2008
Posts: 40
|
Thank you all. I completely forgot about doctypes (i'm still learning)--I'm using XHTML so I guess <br /> it is. Thanks. Quote:
I'm curious about that? I mean, why is that? I'm trying to write a template with content that will be manually added and edited throughout several pages. We won't use content management so we're trying to be as effective as possible (read:fast) given the limitations. It seems to me that using different paragraph styles would not only be more difficult to read (the code I mean) but it would take more time to write. Am I wrong here? |
|
|
|
|
#11 (permalink) |
|
Semantics, yay.
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,534
|
HTML is for marking up content; CSS is for changing the visual style of that content. If your aim is more white-space, you do that with CSS. The proper use for a <br /> would be something like this: HTML Code:
|
|
|
|
#12 (permalink) | |
|
Senior Member
Join Date: May 2007
Location: England
Posts: 1,010
|
Quote:
I thought it was clear enough. USing <BR> or other things like $nbsp etc to pad out or create white space is wrong. yes you can do it, but you should not. If you want more space between a couple of paragraphs you use CSS to increase the paragraphs margins. If you just want one paragraph to have a bigger gap then give this a class or if only occurance on page an id. HTML Code:
War is Gods way of teaching Americans Geography
Wot Speeling Mishtake? |
|
|
![]() |
|