What is and what is br clear="all"?

3

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

What's the difference from <br> to <br clear="all"> ? When should I use one or the other?

    
asked by anonymous 07.12.2018 / 11:51

2 answers

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 clearing all floats of alignment.

The use of

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

Since the layout is all set up in CSS as a good practice. ** used example of inline css is indicated as an example only, not as good practice as well.

    
07.12.2018 / 12:03
1

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

In the past, this approach was often used to break content around an image or table aligned to the right or left.

This example shows a <br> with which a clear attribute 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: link

    
07.12.2018 / 12:01