Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 375141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:28:25+00:00 2026-05-12T14:28:25+00:00

What is considered better practice: <div class=clr></div> (Where clr is clear:both) or just simply:

  • 0

What is considered “better” practice:

<div class="clr"></div> (Where clr is clear:both)
or just simply:

<BR CLEAR:BOTH />

I’m really confused since I was once told never to use BR but then BR is designed to be what the div class is?

Question:

Would it be wrong to just use <BR /> when you want to clear or should I use the div?

Thanks in advance

edit: I’ve already read http://www.w3.org/TR/html4/appendix/notes.html#notes-line-breaks and http://www.w3.org/TR/html4/struct/text.html#edef-BR

example (note I’ve removed classes and added the style directly to the html for ease of reading):

<div style="float:left;">
    <a href="www.example.com"><img style="float:left;" src="/images/videos/video.jpg" width="90" height="75" alt="thumb" title="title" /></a>
    <a href="www.example.com" >Title text</a>
    <div style="clear:right;"></div>
    <span>Length: duration here</span>
    <div style="clear:right;"></div>
    <span>descriptive text here<span>
    <div style="clear:right;"></div>
    <span>Date: date of added here</span>
</div>

In your expert opinions am I using spans, divs, etc correctly? Should I use BR’s instead of Divs for the breaks.

Thanks everyone

Closing Note:

Thank you for all for pointing out that a linebreak is nothing to do with clearing of floats. I need to learn exactly what a linebreak is… I guess I don’t know.

Thanks to freddy for seeing what I actually wanted to do and giving me the solution I clumsily asked for.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:28:26+00:00Added an answer on May 12, 2026 at 2:28 pm

    None of the above. Best practice is to use the HTML to give structure to the information.

    So, you use div to put a section of information in the page. If you need a line break after that information, you use CSS to style that.


    <div id="someinformation">
       <p>some parragraph of info</p>
       <ul>
          <li>an item of the list</li>
          <li>another item</li>
          <li>yet another item</li>
       </ul>
    </div>
    

    Now in CSS you can style as needed. The document on its own have structured information with some default way of being rendered by the browsers. The structure plays well with screen readers which are not bothered with HTML elements for visual appearance.

    Say you have more elements, in CSS you can decide to let them appear beside each other, or with a line break, or with some margins.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it considered better practice and/or more efficient to create a 'reset' function for
Would this code be considered bad practice: <div id=sidebar> <% =DisplayMeetings(12) %> </div> This
Rare cases aside, eval() is considered bad practice in JavaScript. I've just come across
Why is it considered better practice to use enum not static const bool in
I'm curious what is considered a better practice when returning a collection of objects
Is it considered better practice to store a first_name and a last_name in 2
What is considered general best practice: Reference via the super type? public class BirdFeeder{
I would like to know which is considered more correct or better practice: Part
What is considered better style for an event definition: public event Action<object, double> OnNumberChanged;
Which is considered better style? int set_int (int *source) { *source = 5; return

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.