ID styles

  • Usually applied to a layout div tag:
    • <div Id="example">header content goes here</div>
      ( #example { width: 400px; padding: 10px; font-weight: bold; color: #FC9; text-align: center; border: 2px solid #6CC; margin: 10px; } )
      header content goes here
    • Is distinguished from class styles as it is a one shot deal per page. It is used mostly for layout objects like container, header, content and footer
    • Class styles can be used multiple times per page

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style type="text/css">
#example { width: 400px; padding: 10px; font-weight: bold; color: #FC9; text-align: center; border: 2px solid #6CC; margin: 10px; }
</style>
</head>

<body>
<div id="example">header content goes here</div>
</body>
</html>