diff --git a/book/styles.md b/book/styles.md index 3acc60c23..6bbb3049f 100644 --- a/book/styles.md +++ b/book/styles.md @@ -19,10 +19,14 @@ Parsing with Functions One way a web page can change its appearance is with the `style`\index{style} attribute. For example, this changes an element's background color: -``` {.html .example style=background-color:lightblue} -
+``` {.html .example} +
Blue background
``` +And it renders like this: + +
Blue background
+ More generally, a `style` attribute contains property–value pairs separated by semicolons. The browser looks at those CSS property–value\index{css property value}