HTML Attributes


  • HTML Attributes

    • HTML elements can have attributes to provide additional information
    • Attributes are always specified in the start tag
    • Attributes come in name vale pairs and both of them are case insensitive.
      Ex: <img src = "mypic.jpg" /> images are define with img tag and the path of the image specified in the src attribute


  • Attribute Name Value pairs
    Attribute values always be enclosed in quotes. Most commonly used double quotes, but single quotes are also applicable Ex: <p align = "center">
    * Sometimes attribute values itself contain quotes, it is necessary to use single quotes Ex: name = 'Bill "president" Clington'

No comments:

Post a Comment