HTML and CSS Reference
In-Depth Information
he level-two heading can then be written as follows:
<h2 id="aardvark"> A Is For <em> Aardvark </em></h2>
You may have to adjust the width and padding to match the background
to the text, but search robots will see the full heading while humans see
the combination of text and image. Use this technique only for special
cases and not as a general design technique so that you don't end up edit-
ing everything twice.
Use alternative descriptions for images . Actually, the alt attribute is
required in all images for the page to be considered valid HTML. Search
engine robots are very interested in images. If they could see images as
we humans do, each image might be worth a thousand words. he robots
look irst at the value of the image element's alt attribute to try to under-
stand the meaning of an image. But the robots also look at the image's
ilename and adjacent text for additional context and conirmation of
what is in the alt attribute.
Use descriptive ilenames for documents and media resources where
possible. Consider this image element:
<img src="images/image_27818.jpg" alt="frank cooking"/>
A robot couldn't tell if the image was of a person or a hotdog. It would
be better if the ile could be renamed and the image element rewritten as
<img src="images/frank_smith.jpg" alt="Frank Smith cooking
If you use good web development tools, you shouldn't have to type
ilenames more than once. So why not make them longer and more
Label and order menu items with care . Robots try to identify naviga-
tion menus. In so doing, they assume that the order of items in the menu
relects their order of importance to the site visitor. Robots try to match
navigation menu items to the titles and major headings of the pages those
items are linked to. Make it easy for robots to identify your site's main
menu by using the HTML5 nav element and simple lists or menu ele-
ments instead of tables, imagemaps, or other complex structures.
Search WWH ::

Custom Search