Menu ▼

Previous Next

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 :



    <title>HTML Tutorial</title>




    <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 />




Output :
HTML Tutorial

Style applied for this div.

Previous Next