But for all documents it also provides some more convenient methods for accessing, adding and modifying attributes, as described next. It's also interesting to note that you can define your own attributes in the HTML tag itself. Altering attributes is one way to create dynamic effects. Below is a sample paragraph. Text in a paragraph element.
Styles are a little more involved.
As you know, CSS can be used to apply style parameters to an individual tag, all tags of a given type or assigned using classes. Likewise, styles for a particular element can be inherited from any of these sources. You can also alter these styles at various levels. But these methods will alter all of the element's style parameters. Often, you may want to change just a single style parameter, or a select few, while retaining the others.