Attributes part 2

HTML Fundamentals
HTML Basics
Attributes
54
2/4
               

Attribute Measurements



As an example, we can modify the horizontal line so it has a width of 50 pixels.

This can be done by using the width attribute:
<hr width="50px" />Try It Yourself

An element's width can also be defined using percentages:
<hr width="50%" />Try It Yourself

An element's width can be defined using pixels or percentages.

Comments