In this section we will discuss the style attribute. Style attribute is very important in html tag. We can inner line style in the tag by using the style attribute. This style attribute has many properties to design the tag text, border, float, padding, margin etc. when we write the style attribute then the style called inner line style and when we write style by using class or id then it’s called external style. ‘div’ is a very important tag in html. Basically, div wide 100% all time and height will be set. We can use tag under tags. Now given bellow the inner line style example code and explain the code:
<!DOCTYPE html> <html> <head> <title>This is HTML</title> </head> <body> <!--HTML heading tag--> <div style="border:1px solid black;height: 180px;background-color: #FAEBD7"> <h2 style="text-align: center;color: red">Farhan Sakib Jesy</h2> <p style="font-weight: bold;text-align: center;"> Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion. I Just make my passion Convert to Profession. I Eenjoy Programming. </p> </div> </body> </html>
We can see the output of the code. In this code we use inner line style and some font property. Also use background color into the div.