Use of HTML Class Attribute

Use of HTML Class Attribute:

Our HTML (Hyper Text Markup Language) lessons, By and by going basic to advance level. We already mentioned, In Create html form lesson about cascading style sheets and utilize it in form buttons. Same as earlier, Now we will do discuss explanatory on html classes attribute. HTML Class attribute uses for to make attractive interface. HTML is only used for develop interface but html class use for give any style to this interface. We will reveal a lot of codes and attributes inside html class. Go ahead, And take meaningful example below.

<html>
<body>
<input type="button" name="Signup" value="Signup" class="sbutton">
</html>
</body>

Above we shows that, Only HTML code but if you noticed. We written tiny button code with html class attribute like class="sbutton" So, its means that,sbutton class have specific command of CSS, which will apply on this button tag because this html class presence inside of this input button tag. So it is important that, to provide the code of CSS (Cascading Style Sheets). We mention CSS code below for this above input button class with sbutton. See the example below.

<style>
.sbutton{
 font-family:Verdana, Geneva, sans-serif;
 font-size:19px;
 background:#00AFEF;
 color:#FFF;
 border-radius: 25px;
 text-shadow: 1px 1px #000;
 border:groove;
}
</style>

The above CSS code will make this html input button attractive/Stylish through html class. This code contains particular attributes like font-family, font-size, background, color and further on. Look at the above style code once again and observe that, We mentioned Style tag on first line as a
opening tag and again put in last line with backslash as a closing tag same as in html tags rules. You can add multiples attributes to make this button attractive and beautiful. You can utilize best code editors to write your development codes. You can see the below preview of above whole code in notepad editor and on the left hand side preview of button style.

HTML Class

Summarize the html and html class with CSS, You can design handsome forms and numerous interfaces. After read this article and after know about html class, Your interest will increase in html development. Hopefully, This lesson will increase your development skills. For more discussion regarding html class or development, leave your comment below. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *