HTML and CSS Reference
In-Depth Information
Images
Images are embedded with the img element. If XHTML syntax is used, self-closing is required. The location of the
image file is determined by the src (source) attribute.
1.
Embed a basic image.
<img src="images/logo.png" />
2.
Provide alternate content that can be rendered in case the image cannot be displayed
(fundamental for accessibility).
<img src="images/logo.png" alt="The logo of Big Profit Company" />
3.
Provide a text to be displayed when the user moves the mouse over the image (optional). It
can be the same as the alternate text or different.
<img src="images/logo.png" alt="The logo of Big Profit Company" title="The logo of Big
Profit Company" />
Lists
List items of both ordered ( ol ) and unordered lists ( ul ) are delimited by <li> and </li> (Listing 12-1).
Listing 12-1. List Item Structure in Ordered and Unordered Lists
<ol>
<li></li>
<li></li>
...
<li></li>
</ol>
<ul>
<li></li>
<li></li>
...
<li></li>
</ul>
1.
An unordered list can be created as follows:
<ul>
</ul>
2.
The list items can be added arbitrarily.
<ul>
<li>Apricot</li>
<li>Cherry</li>
<li>Peach</li>
</ul>
 
Search WWH ::




Custom Search