46 CHAPTER 2 Getting started with HTML5
At the time of this writing, the seamless attribute is not supported on any browsers, but its
intent is to blend the external content into the current HTML document so the HTML page
does not look like it has embedded content. The alternative is to use CSS to obtain a similar
presentation.
Working with hyperlinks
The <a> element creates a link to an external HTML document (external link) or jumps to
a location in the current HTML document (internal link). The content of the <a> element is
displayed in the browser with the following default appearance.
■■Unvisited link Underlined and blue
■■Visited link Underlined and purple
■■Active link Underlined and red
The <a> element has the href attribute, which you usually use to specify the link destina-
tion. If the link is external, the href can be populated with either a relative or absolute URL as
follows.
<a href="ExpenseReports.html">Expense Report Page</a>
<a href="http://www.contoso.com/SalesReports.html">Sales Report Page</a>
If the link is internal, the href will contain the hash (#) symbol followed by the id of the tag
that you want to jump to. If you use only the hash symbol, clicking the link takes you to the
top of the HTML document. Here are two examples.
<a href="#">Top</a>
<a href="#BillingAddress">Go To Billing Address</a>
Specifying the hyperlink target
When you’re on a webpage and you click a hyperlink to an external resource, the exter-
nal resource opens in the current browser window. If the external link is to a page on your
website, this behavior probably makes sense. If the external link is to a different website, you
might want to open a new browser window. By using the target attribute, you can control the
link behavior by assigning one of the following.
■■_blank Open in a new browser window
■■_parent Open in the parent frame or window
■■_self Open in the current window or frame (default)
■■_top Open in the topmost frame, thus replacing the contents of the window
■■<iframe_name> Open in the <iframe> element with matching name attribute
When you have a menu with hyperlinks that shows on every page, you might want to
create an <iframe> element with its name attribute set to content and then set the target