0321699742_The_HTML_Pocket_Guide

Page 77

66

Part฀2:฀HTML฀Elements฀and฀Guidance

HTML5฀and฀the฀style฀Element฀(continued) Example:฀ <body> . . . <article><!-- this doesn’t receive padding --> <h1>This is not affected</h1> <p>This is not affected.</p> </article> <article><!-- this receives padding --> <style type="text/css" scoped> article { padding: 25px; } h1 { color: blue; } p { color: red; } </style> <h1>This is blue.</h1> <p>This is red.</p> </article> . . . </body> n

title:฀If฀a฀title฀is฀present,฀it฀deines฀the฀style฀element฀as฀an฀

alternate฀style฀sheet.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.