Empowering Today’s Learners to Become Tomorrow’s Leaders
Inline styles can only be placed in the body element of your document.
They are always placed inside a beginning tag as an attribute of that tag.
<element attribute="property: value; property: value;">
<p style="color:red; text-align: center;"> some content </p>
p is the HTML element
style is the attribute of the HTML element
style has the properties color and text-align
color has the value red
text-align has the value center
Inside the beginning tag use the attribute style
Attributes always are followed by the equal sign (=) and then the value
Values are inside quotation marks "some value"
Inside the quotations(the value), list the characteristics you want the tag to use
Use a semi-colon (;) to separate each characteristic.
Still in css.html. Add the following code inside the body element
<p style="color: red;"> This paragraph is styled in red. It's appearance is controlled by the inline style.</p>
2. Save and preview in a browser