inline css

Inline CSS syntax (simple examples)

Just a quick note here today on the inline CSS syntax, which I can never remember. To add CSS to your web pages using the inline syntax, just add a style tag to your HTML tag, including your CSS styles within the quotes of the style tag as shown here:

<div style="border-style: dotted; border-color: #ccc;">

The CSS styles you define within your quotes are defined just as you would in an external style sheet, but they are all on one line, as shown in that example.

Syndicate content