This is a discussion on "break tag" within the Web Page Design section. This forum, and the thread "break tag are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
break tag
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
break tag
Hi,
I know this is a really basic question but I am a total beginner. Is it ok to use the break tag in strict XHTML with the new standards and if so is there a space between the br and the /? ie <br/> or <br /> or maybe something else entirely? Should I use paragraphs instead? Sorry its so basic. Last edited by milly; Apr 27th, 2007 at 02:08. Reason: missed a bit |
|
|
|
#2
|
||||
|
||||
|
Re: break tag
No worries
If you've got text, use the <p> tags. I only use <br /> if I want something to break for a single line. For example: 1020 West Point Dr. Omaha, NE 57105 United States For that... I would use <br />. Just about anything else I use <p>. |
|
#3
|
|||
|
|||
|
Re: break tag
Quote:
|
|
#4
|
|||
|
|||
|
Re: break tag
Quote:
I always have break between r and / as it's just good coding practice. |
|
#5
|
||||
|
||||
|
Re: break tag
Oh, I learned something new today!
|
|
#6
|
|||
|
|||
|
Re: break tag
I learned something new too!
|
|
#7
|
|||
|
|||
|
Re: break tag
personally I try and avoid break tags... it's nothing that can't be done using CSS and it just seems like a back-door way of adding style to my content.
What if I later chose that I wanted all addresses to be displayed on one line, or that I wanted the line spacing widened? It would be much easier to change a single definition in my CSS, than possibly a whole lot of HTML. A rubbish example, I know - but it still feels like cheating to me! |
|
#8
|
|||
|
|||
|
Re: break tag
Snow can you give an example of how you would do an address with html/css?
|
|
#9
|
|||
|
|||
|
Re: break tag
I'd use something like:
|
|
#10
|
|||
|
|||
|
Re: break tag
I don't think that would typically work for me then...
I usually give my p tags a margin-bottom of 20px to break up paragraphs. However if I did #address.p that might work??? |
|
#11
|
|||
|
|||
|
Re: break tag
|
|
#12
|
|||
|
|||
|
Re: break tag
Thanks snow... I'll try that from now on..
|
|
#13
|
||||
|
||||
|
Re: break tag
That's horrible code! An address doesn't consist of three paragraphs. Semantics people! I'd do a negative line-height before adding p tags.
|
|
#14
|
|||
|
|||
|
Re: break tag
lol, it was just an example - I've not really had to put addresses on the sites I've produced... but what would you do if you wanted to display the address on one line?
but I would never want to use a <br/> tag anywhere on my site - it just doesn't seperate the style and content... |
|
#15
|
||||
|
||||
|
Re: break tag
I really can't think of any reason why I would want this:
1020 West Point Dr. Omaha, NE 57105 United States I see what you're saying, but if you use the break tag correctly, you won't ever need CSS to change its looks. |
|
#16
|
|||
|
|||
|
Re: break tag
but you couldn't do this, could you?
|
|
#17
|
||||
|
||||
|
Re: break tag
I can't imagine why I would ever want to, but use spans if it's necessary.
|
|
#18
|
|||
|
|||
|
Re: break tag
haha; spans, divs; whatever - the question is whether a br is part of the content or style... for me I would always consider it styling, but while the W3C remains silent on the issue, it's open for interpretation
|
|
#19
|
||||
|
||||
|
Re: break tag
Never think of content as style; it's always a shut and closed case. As for an address, <br /> is the right way to do it. You need to think of the way it looks without any CSS. Again, semantics!
|
|
#20
|
|||
|
|||
|
Re: break tag
I tried putting address lines into <p>'s - the code wouldn't validate (XHTML strict) so I had to take the <p>'s out and use <br />
|
![]() |
| Tags |