HTML:Horizontal Line color

<!DOCTYPE html>
<html>

<head>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <title>Horizontal Line color</title>
</head>

<body>

 First Line
 <hr color="red"> Second Line
 <hr color="green"> Third Line
 <hr color="blue">

</body>

</html> .                     Output=First Line

Second Line

Third Line

          Definition=

hr line color


We can change the line colour, using colorattribute.
Details of attribute
  • All html tag have chance to contain attributes
  • Attributes always specified in the start tag (eg:<p class='cls'> => we cannot specified this in close tag </p>).
  • These are just specifies some additional information about the elements.
Some common attribute names
  • id 
    (eg, <p id='test'>Test paragraph</p>).
    id value should unique for the whole documents.
  • class 
    (eg, <p class='clsname'>Test paragraph</p>).
    Same class name have chance to contain more than one html element.
  • name 
    (eg, <p name='tstname'>Test paragraph</p>).
HTML:Horizontal Line color HTML:Horizontal Line color Reviewed by Network security on April 29, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.