6/24/20

HTML STYLES



HTML STYLE


In Html, the style attribute is used to add style to an element. Eg Color, background color, font size, weight, etc.


Syntax of the Html style


<tagname style= "property: value;">


The Property and value is the CSS property and value respectively.


Background Color


You can change your Html webpage background color. 
The CSS background-color property was used to change the background color of your webpages.


Example to change whole page background-color


<body style = "background-color:Yellow">


<h1> Example of HTML Styles </h1>


<p> This is a paragraph tag. </p>


</body>


Output:-



Example to change background color of two different elements:-


<h1 style=”background-color:red”> Example of HTML Styles </h1>


<p style=”background-color:yellow”> This is a paragraph tag. </p>


Output:-



TEXT COLOR


You can also change your text color by applying CSS color property. Let’s see through an example.


Example to change text color:-


<h1 style = "color: purple"> Example of HTML Styles </h1>


<p style = "color: Blue"> This is a paragraph tag. </p>


Output:-



TEXT SIZE


You can change your text size by applying font-size CSS property. Let’s see through an example.


Example to change font size


<h1 style = "font-size:48px"> Example of HTML Styles </h1>


<p style = "font-size:40px"> This is a paragraph tag. </p>


Output:-



FONTS


You can also change your fonts by applying font-family CSS property. Let’s see through an example.


Example to change fonts


<h1 style = "font-family:Algerian"> Example of HTML Styles </h1>


<p style = "font-family: Forte"> This is a paragraph tag. </p>


Output:-



So friends, today we learned about Html styles I hope you understand. If you have any quarries about this article comment below.


Thank you so much for visiting here.


Have a nice day you all.



"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    0 comments:

    Post a Comment

    Follow on Twitter

    Linkedin

    Categories

    Contact Form

    Name

    Email *

    Message *

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.