What is and what is the < br clear="all" >?

Asked

Viewed 1,224 times

3

I remember it used to be common to see this <br clear="all"> in source codes. But I’ve always wondered why this clear all?

What is the difference of a <br> for a <br clear="all">? When I should wear one or the other?

  • But why would you use clear="all" if you are deprecated in Html5?

  • @Leandrade should be why I no longer see rss. If you can post a response on this and with the source ;)

  • Worse is so deprecated Hugo, that I can’t imagine anything to accomplish an example :)

  • 1

    @Leandrade boy in the test I did here put a br clear all between two Divs with float, then the second div fell to the bottom line, and kind of a clearfix so I thought

  • Hugo seems to be this by what I read tbm, as said there is not much more information about this attribute Html.

2 answers

2

The attribute clear is an attribute used to clear pre-existing alignments. This ensures that the content after the <br> appears below the baseline of the previously aligned element.

In the past, this approach was usually used to interrupt content around a right or left-aligned image or table.

This example shows a <br> with which an attribute clear is used to take content below a right-aligned image:

<p> <img src = "pool.jpg" alt = "sentado à beira da piscina" align = "right" />
   Texto 1
  <br clear="all"/>
    Texto 2
</p>

Source: https://www.sitepoint.com/clear-html-attribute/

2


The clear property is a property used to clear any right or left alignment of that element.

If you use this property you will be cleaning from all sides ("all") alignment floats.

The use of

<br style="clear:left;"/> 

Once the layout is all set up in CSS as good practice. ** Used example of inline css is given only as example, not as good practice either.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.