Using the style attribute, you can design or you can set the color, width, height, font, and many more in your HTML element. Let's understand by example.


Syntax:

<tagname style="property:value;">

Example:

 <p style="
           color: red;
           font-size: 22px;
           font-weight: bold;
           /*you can add much more if you know css*/
           ">
            HTML Styles attribute
   </p>

/*This is CSS comment*/


Output:

HTML Styles attribute


Download source code

Are you facing problems in understanding this article? download source code now