id selectors
id names are referenced in CSS as #idref
, and may or may not have an element name preceding the period (#idref
or element#idref
.
<div id="header">put in header information here
</div>
<div id="main"><!-- main content -->Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras sollicitudin, orci nec facilisis vehicula, neque urna porta risus, ut sagittis enim velit at orci. Fusce velit. Integer sapien enim, rhoncus vitae, cursus non, commodo vitae, felis. Nulla convallis ante sit amet urna. Maecenas condimentum hendrerit turpis.
</div>
<div id="footer">put in footer information here
</div>
In style
element
(<style>
) within head
element:
#main {
background-color: blue;
color: white;
border-color: green;
border-width: thick;
border-style: solid;
}