document.tags.borderTopWidth

JavaScript 1.2+ Nav4+ Syntax

document.tags.tagName.borderTopWidth

Description

The borderTopWidth property specifies the width of the top border of an element as associated with the tag called tagName.

Example

Listing 7.170 uses the borderTopWidth property to set the size of top border that surrounds a text header. Notice that only the top portion of the border is shown.

Listing 7.170 Setting the Top Border Width with the borderTopWidth Property
<html>

<script>
<!-- Hide

//Create a style sheet tag that creates a top border
document.tags.H2.borderTopWidth = "10";

//Hide End --->
</script>

<h2>This text has a top border</h2>

</html>
							
						

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.