Style


The attrbiute style we will used to apply styles like height, width, background color, color, font,... to the control.

Syntax:

<input type="text" style="styleshere..."/>

Example:

<html> <head> <title>HTML Tutorial</title> </head> <body> <form> <input type="text" style="width: 300px;" /><br /><br /> <input type="button" style="width: 100px; height: 30px; padding: 5px; background-color: #275257; font-weight: bold;" value="Save" /><br /><br /> <div style="background-color: Green; color: White; padding: 30px;"> Style applied for this div. </div><br /> </form> </body> </html>

Output:





Style applied for this div.