{"id":68,"date":"2018-03-12T11:09:47","date_gmt":"2018-03-12T11:09:47","guid":{"rendered":"https:\/\/people.utm.my\/emilysff\/?p=68"},"modified":"2018-12-31T07:32:53","modified_gmt":"2018-12-31T07:32:53","slug":"html-styles","status":"publish","type":"post","link":"https:\/\/people.utm.my\/emilysff\/2018\/03\/12\/html-styles\/","title":{"rendered":"HTML Styles &amp; Colors"},"content":{"rendered":"<h2>HTML Styles<\/h2>\n<p>Setting the style of an HTML element, can be done with the\u00a0<code class=\"w3-codespan\">style<\/code>\u00a0attribute.<\/p>\n<p>The HTML\u00a0<code class=\"w3-codespan\">style<\/code>\u00a0attribute has the following\u00a0<strong>syntax<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-66 alignleft\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-2.jpg\" alt=\"\" width=\"293\" height=\"44\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><em>Example :<\/em><\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;p&gt;I am normal&lt;\/p&gt;<br \/>\n&lt;p style=&#8221;color:red;&#8221;&gt;I am red&lt;\/p&gt;<br \/>\n&lt;p style=&#8221;color:blue;&#8221;&gt;I am blue&lt;\/p&gt;<br \/>\n&lt;p style=&#8221;font-size:50px;&#8221;&gt;I am big&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><em>Output :<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-69\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-3-300x213.jpg\" alt=\"\" width=\"300\" height=\"213\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-3-300x213.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-3.jpg 463w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>HTML Background Color<\/h2>\n<p>The\u00a0<code class=\"w3-codespan\">background-color<\/code>\u00a0property defines the background color for an HTML element.<\/p>\n<p>This example sets the background color for a page :<\/p>\n<p><em>Example :<\/em><\/p>\n<blockquote><p>&lt;body\u00a0style=&#8221;background-color:powderblue;&#8221;&gt;<\/p>\n<p>&lt;h1&gt;This is a heading&lt;\/h1&gt;<br \/>\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<\/p><\/blockquote>\n<p><em>Output :<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-70\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-4-300x156.jpg\" alt=\"\" width=\"300\" height=\"156\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-4-300x156.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-4.jpg 507w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>HTML Text Color<\/h2>\n<p>The\u00a0<code class=\"w3-codespan\">color<\/code>\u00a0property defines the text color for an HTML element:<\/p>\n<p><em>Example :<\/em><\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;h1 style=&#8221;color:blue;&#8221;&gt;This is a heading&lt;\/h1&gt;<br \/>\n&lt;p style=&#8221;color:red;&#8221;&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><em>Output :<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-79\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/07\/Capture-300x157.jpg\" alt=\"\" width=\"300\" height=\"157\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/07\/Capture-300x157.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/07\/Capture.jpg 448w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML Styles Setting the style of an HTML element, can be done with the\u00a0style\u00a0attribute. The HTML\u00a0style\u00a0attribute has the following\u00a0syntax: &nbsp; &nbsp; Example : &lt;html&gt; &lt;body&gt; &lt;p&gt;I am normal&lt;\/p&gt; &lt;p style=&#8221;color:red;&#8221;&gt;I am red&lt;\/p&gt; &lt;p style=&#8221;color:blue;&#8221;&gt;I am blue&lt;\/p&gt; &lt;p style=&#8221;font-size:50px;&#8221;&gt;I am big&lt;\/p&gt; &lt;\/body&gt; &lt;\/html&gt; Output : HTML Background Color The\u00a0background-color\u00a0property defines the background color for an HTML [&hellip;]<\/p>\n","protected":false},"author":14432,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[17,16],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-it","tag-html","tag-itknowledge"],"_links":{"self":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/users\/14432"}],"replies":[{"embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":0,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"wp:attachment":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}