create account

HTML 5 Tutorial #8 - HTML Styles by cj23

View this thread on: hive.blogpeakd.comecency.com
· @cj23 ·
$40.16
HTML 5 Tutorial #8 - HTML Styles
# The HTML Style Attribute 
You can change the styling of an element by using the style attribute. Below is the syntax for declaring the style attribute. 

<tagname style="property:value;">

The property is a CSS property. The value is a CSS value. CSS is a language we used for designing the HTML. You will learn more about CSS in this tutorial so don't worry. 

To be more specific, **tagname** is the name of element and we add **style** attribute to change the style of the element. The **property** is what we want to change in that element. For example the color of the text, background color, size, etc. The **value** is the output of that property we want to change. 

## HTML Background Color
If you want to change the background color of an HTML element, we can use the background-color property. The example below will display a powder blue background color. 

![example.png](https://steemitimages.com/DQmRLRWLESY6HTVyD7HegCPPVgsKsF7M4jzUewSmoCpk6vU/example.png)

## HTML Text Color
If you want to change the text color of an HTML element, we can use color property. 

![example.png](https://steemitimages.com/DQmRiAdaT1GW6dohkhUc9ZdAXeH3sYUKdR6HJ5jpgmDmree/example.png)

## HTML Fonts
Use font-family property for changing the text font. 

![example.png](https://steemitimages.com/DQmZ9srEpEm7K9RJF5BrMJFrjkArTHRX4N4JUB62hquvGwB/example.png)

## HTML Text Size
Use font-size property for changing the size of the text. Font-size value can be in percentage or pixel. 

![example.png](https://steemitimages.com/DQmYxJ89eroNXxxGC9EuZVwpweQCKA2wRZWaUcJTxPrAD8X/example.png)

## HTML Text Alignment
Some of the texts need alignment and the property for it is text-align property. 

![example.png](https://steemitimages.com/DQmY4Q4hHaEAXea2gTh99WYhtZW6Vb1ykoBSaFC3Dxa7yNh/example.png)

These are just some of the CSS property often used in designing HTML element. There's so much more to learn in here  so stay tuned for my next tutorial. 

<hr> 

### HTML 5 Tutorials:
[HTML 5 Tutorial #1 - Introduction](https://steemit.com/steemit/@cj23/html-tutorial-1-introduction)
[HTML 5 Tutorial #2 - HTML Editors](https://steemit.com/steemit/@cj23/html-tutorial-2-html-editors)
[HTML 5 Tutorial #3 - HTML Basic](https://steemit.com/steemit/@cj23/html-5-tutorial-3-html-basic)
[HTML 5 Tutorial #4 - HTML Elements](https://steemit.com/steemit/@cj23/html-5-tutorial-4-html-elements)
[HTML 5 Tutorial #5 - HTML Attributes](https://steemit.com/steemit/@cj23/html-5-tutorial-5-html-attributes)
[HTML 5 Tutorial #6 - HTML Headings](https://steemit.com/steemit/@cj23/html-5-tutorial-6-html-headings)
[HTML 5 Tutorial #7 - HTML Paragraphs](https://steemit.com/steemit/@cj23/html-5-tutorial-7-html-paragraphs)
👍  , , , , , , , , , , , , , , , , , ,
properties (23)
authorcj23
permlinkhtml-5-tutorial-8-html-styles
categorysteemit
json_metadata{"tags":["steemit","steem","blog","philippines","steemph"],"image":["https://steemitimages.com/DQmRLRWLESY6HTVyD7HegCPPVgsKsF7M4jzUewSmoCpk6vU/example.png","https://steemitimages.com/DQmRiAdaT1GW6dohkhUc9ZdAXeH3sYUKdR6HJ5jpgmDmree/example.png","https://steemitimages.com/DQmZ9srEpEm7K9RJF5BrMJFrjkArTHRX4N4JUB62hquvGwB/example.png","https://steemitimages.com/DQmYxJ89eroNXxxGC9EuZVwpweQCKA2wRZWaUcJTxPrAD8X/example.png","https://steemitimages.com/DQmY4Q4hHaEAXea2gTh99WYhtZW6Vb1ykoBSaFC3Dxa7yNh/example.png"],"links":["https://steemit.com/steemit/@cj23/html-tutorial-1-introduction","https://steemit.com/steemit/@cj23/html-tutorial-2-html-editors","https://steemit.com/steemit/@cj23/html-5-tutorial-3-html-basic","https://steemit.com/steemit/@cj23/html-5-tutorial-4-html-elements","https://steemit.com/steemit/@cj23/html-5-tutorial-5-html-attributes","https://steemit.com/steemit/@cj23/html-5-tutorial-6-html-headings","https://steemit.com/steemit/@cj23/html-5-tutorial-7-html-paragraphs"],"app":"steemit/0.1","format":"markdown"}
created2018-01-28 14:56:48
last_update2018-01-28 14:56:48
depth0
children7
last_payout2018-02-04 14:56:48
cashout_time1969-12-31 23:59:59
total_payout_value30.336 HBD
curator_payout_value9.821 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,703
author_reputation1,090,777,745,148
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,026,193
net_rshares4,918,661,744,954
author_curate_reward""
vote details (19)
@appreciator ·
<p>This post has received gratitude of 0.75 % from @appreciator thanks to: @cj23.</p>
properties (22)
authorappreciator
permlinkre-cj23-html-5-tutorial-8-html-styles-20180129t092844203z
categorysteemit
json_metadata{"tags":["steemit"],"app":"drotto/0.0.3"}
created2018-01-29 09:29:06
last_update2018-01-29 09:29:06
depth1
children0
last_payout2018-02-05 09:29:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length86
author_reputation55,801,543,512,306
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,241,708
net_rshares0
@boomerang ·
This post has received a 1.42 % upvote from @boomerang thanks to: @cj23
properties (22)
authorboomerang
permlinkre-html-5-tutorial-8-html-styles-20180129t110336
categorysteemit
json_metadata"{"app": "pysteem/0.5.6"}"
created2018-01-29 11:03:36
last_update2018-01-29 11:03:36
depth1
children0
last_payout2018-02-05 11:03:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation1,273,205,827,891
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,260,893
net_rshares0
@booster ·
<p>This post has received a 0.68 % upvote from @booster thanks to: @cj23.</p>
properties (22)
authorbooster
permlinkre-cj23-html-5-tutorial-8-html-styles-20180129t091628095z
categorysteemit
json_metadata{"tags":["steemit"],"app":"drotto/0.0.3rc3"}
created2018-01-29 09:16:27
last_update2018-01-29 09:16:27
depth1
children0
last_payout2018-02-05 09:16:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length78
author_reputation68,767,115,776,562
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,239,101
net_rshares0
@hellowhale ·
This wonderful post has received a @cj23 3.79% upvote from @hellowhale. Discord Channel: https://discord.gg/WVJW7AC  Please vote with the link below if you support our project. https://goo.gl/1zYDKh
properties (22)
authorhellowhale
permlink20180129t093811186z
categorysteemit
json_metadata{"tags":["thanks"],"app":"steemjs/test"}
created2018-01-29 09:38:15
last_update2018-01-29 09:38:15
depth1
children0
last_payout2018-02-05 09:38:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length198
author_reputation66,589,706,744
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,243,547
net_rshares0
@lovejuice ·
re-cj23-html-5-tutorial-8-html-styles-20180129t092113887z
This post has received a 1.84% upvote from @lovejuice thanks to @cj23. They love you, so does Aggroed. Please be sure to vote for Witnesses at https://steemit.com/~witnesses.
properties (22)
authorlovejuice
permlinkre-cj23-html-5-tutorial-8-html-styles-20180129t092113887z
categorysteemit
json_metadata{"app":"postpromoter/1.7.4"}
created2018-01-29 09:21:12
last_update2018-01-29 09:21:12
depth1
children0
last_payout2018-02-05 09:21:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length174
author_reputation10,538,740,461,622
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,240,094
net_rshares0
@postpromoter ·
re-cj23-html-5-tutorial-8-html-styles-20180129t083535119z
You got a 0.73% upvote from @postpromoter courtesy of @cj23!

Want to promote your posts too? Check out the [Steem Bot Tracker website](https://steembottracker.com) for more info. If you would like to support the development of @postpromoter and the bot tracker please [vote for @yabapmatt for witness!](https://v2.steemconnect.com/sign/account-witness-vote?witness=yabapmatt&approve=1)
properties (22)
authorpostpromoter
permlinkre-cj23-html-5-tutorial-8-html-styles-20180129t083535119z
categorysteemit
json_metadata{"app":"postpromoter/1.8.2"}
created2018-01-29 08:35:33
last_update2018-01-29 08:35:33
depth1
children0
last_payout2018-02-05 08:35:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length387
author_reputation12,722,616,650,811
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,230,687
net_rshares0
@treeplanter ·
Thanks for your donation
Good job! Thanks to @anonteamph00001 you have planted 0.05 tree to save Abongphen Highland Forest in Cameroon. Help me to plant 1,000,000 trees and share my Steem Power to the others. Selfvoting is prohibited, but that should be the reason to spread the world to protect our precious environment. Check out profile of our conservation association @kedjom-keku and the founder/coordinator @martin.mikes to get more information about our conservation program. My current SP is 18470.19. Help me to plant more trees with your delegated SP. 

Thanks a lot,
your @treeplanter 
[www.kedjom-keku.com](www.kedjom-keku.com)
properties (22)
authortreeplanter
permlinkre-cj23-html-5-tutorial-8-html-styles-20180129t080418980z
categorysteemit
json_metadata{}
created2018-01-29 08:04:21
last_update2018-01-29 08:04:21
depth1
children0
last_payout2018-02-05 08:04:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length614
author_reputation62,929,728,687,402
root_title"HTML 5 Tutorial #8 - HTML Styles"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,224,758
net_rshares0