document.tags.clear

JavaScript 1.2+ Nav4+ Syntax

document.tags.tagName.clear

Description

The clear property specifies the sides of an element where floating elements (elements that define the align property) are not allowed. Using dot notation, this property is associated with the tag called tagName.

The clear property can be assigned one of the following values: left, right, both, or none.

Example

Listing 7.172 uses the clear property to prevent floating elements from being on either side of the text I don't like other elements next to me!.

Listing 7.172 Using the clear Property
 <html> <script> <!-- Hide //Create style sheet tags that set alignments document.tags.P.align = "left"; document.tags.P.backgroundColor = "yellow"; document.tags.I.align ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.