How to use style attribute to define style rules?

JavascriptWeb DevelopmentFront End Scripts

You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:

<element style = "...style rules....">

The following is an example:

<html>
   <head>
   </head>
   <body>
      <p style = "color:#36C;"> This is inline CSS </p>
   </body>
</html>
raja
Published on 13-Apr-2018 07:47:49
Advertisements