the web workshop

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.

The Syntax:

<element attribute="property: value; property: value;">

Looks like:

<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

Directions:

  1. Inside the beginning tag use the attribute style
  2. Attributes always are followed by the equal sign (=) and then the value
  3. Values are inside quotation marks "some value"
  4. Inside the quotations(the value), list the characteristics you want the tag to use
  5. Use a semi-colon (;) to separate each characteristic.

activitySteps to Success

  1. 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

This workshop is brought to you by jdwwebdesign.com

Please feel free to contact us with any comments and/or concerns about this workshop