Graphics Programs Reference
In-Depth Information
Some tags also contain attributes such as size, color, and alignment. These attributes
are placed within the opening tag. Tag attributes are separated by a blank space, and the
value of each attribute is usually placed in quotation marks, as shown in the example:
<tag color=”x” size=”x”> Some Text </tag>
The specifi c tags depend on the applied formatting and the type of element. Helpful
reference sites for HTML tags include www.w3.org , www.htmldog.com/reference/
htmltags , and www.devx.com/projectcool/Article/19816 . Even though some HTML tags
have attributes that enable you to specify the element's size, color, and so forth, a better
practice is to keep styles separate from the content. You create styles that modify the look
of page elements by creating global CSS styles that can affect multiple elements and be
updated from a central location.
Examining HTML Tags
• On the Document toolbar, click the Code button or the Split button.
• If the lines of code do not wrap in the Document window, click the View menu, click
Code View Options, then click Word Wrap.
• In the Code pane, select the tag to examine, right-click the selected tag, and then
click Reference to display a description of the tag in the Reference panel.
Exploring HTML Tags That Apply to Hyperlinks
Hyperlinks are created in HTML with the anchor tag , which has the general format:
<a href=”absolute or relative path”> Link Text </a>
In this tag, “href” is short for hypertext reference, “absolute or relative path”—the URL
or page for the link—is the value for href, and “Link Text” is the text on the Web page
that users click to use the link. Absolute, document relative, and site root relative links
have different path information in the href attribute. Figure 3-12 lists the anchor tags with
the three types of links.
Figure 3-12
Anchor tags for absolute and relative links
Link
Anchor Tag
Description
Absolute
<a href=“ http://www.websitename.
com”> Text link to a Web page outside
current site </a>
Specifies the absolute or complete path to
the linked page.
Document
relative
Specifies the location of the linked page rela-
tive to the current page. Commonly used.
<a href=“anotherpage.htm”> Text link
to another page within current site </a>
Site root
relative
<a href=“/subfolder/anotherpage.
htm”> Text link to another page within
current site </a>
Specifies the location of the linked page rela-
tive to the site's root folder. Used sometimes
when sites have a lot of subfolders within the
root folder and/or change frequently.
You can set the target attribute with an anchor tag. The target specifi es where the
link opens—in the current browser window or a new browser window. By default, the
new page will open in the current browser window, replacing the page from which you
linked. If you want the new page to replace the current page, you do not need to include
a target attribute. If you want the linked page to open in a new browser window, you
Search WWH ::




Custom Search