HTML Inline Style (Style Attribute) Tutorial ..
Hello guys! in this lecture we are gonna learn
HTML style attribute or inline style..
But first, I wanna explain why we need this style thing?
Because, we may need to change the look of an HTML
element.. maybe a background color, a font size
or color.. whatever we want to control in terms of
style we can do that..
it’s easy and I’ll teach you..in this video..
Let’s start with coding our standard HTML structure or skeleton.. To be honest, we don’t need to code this skeleton
because our elements will work without body, or head or html tags.. however, I want you to be professional developer so it’s important to get used to the common structure.. I hope you understand ..
Anyway, I’m implementing my first HTML element, and it is a level one heading.. it could be anything but.. whatever..
Yeah.. put some text inside this.. like “Hi! I’m the Most Important Text in This Document” or you can put whatever text you want.. sky is the limit..
Let’s see how it looks.. as you probably know I always use Coda2 as code editor because I love it, and this code editor has it’s own preview window.. probably your code editor has no feature like this.. that’s not the matter, save your source code and open up your saved html file with any browser like chrome, firefox or safari..
Anyway , I wanna start right away.. the first thing you need to know is how to add an inline style.. An inline style can be inserted into any HTML element with “style attribute”.. that’s what I’m doing right now.. then , add double quotes and write your style rules inside the double quotes. I want my level one heading’s color to be green, so I must do that with color:green CSS rule…