Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    In assisting another user with XHTML compliance, I came to thinking that <br /> actually shouldn't be used for most markup. After reading The Zen of CSS Design, I reaffirmed to myself that markup should be entirely semantic (describe the data, not define the layout) and CSS should apply all of the styling and layout. In that case, <br /> is mainly a layout tool and not semantic.

    For example, if you're using paragraphs, you should use <p></p>, if you are doing blocks of elements, use <div></div>, etc. For preformatted text, <pre></pre> or an equivalent should be used.

    So, in most cases, is <br /> actually discouraged by this logic?
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    What you're saying seems correct.

    There are rarely any times when you need to use <br /> anyway. They really should not be used for spacing, but that's what a lot of beginners do.

  4. #3
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    I wouldn't use them for spacing layout at all.

    About the only case I can see where one could use <br /> is when a line break specifically needs to be placed within a paragraph in order to maintain the original meaning/structure of that paragraph. <br /> used as a line break where a line break is needed conforms with semantic markup.

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    <br /> is a vital semantic element. For example: how would you mark up a poem? Or say, you have two bits of information in a paragraph - and they really just need to go on two lines, but they're the same group of information?
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I guess it's true for that and there are exceptions.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Member
    Join Date
    Jan 2005
    Posts
    97
    Member #
    8727
    <br /> is line break, seriously, if you were typing something in a word processor or writing something... would you want the only way to goto a new line some complicated CSS or starting a new paragraph?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:07 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com