HTML and CSS Reference
In-Depth Information
<body>
<header>
<h1>Document sample</h1>
</header>
<section>
<article>
<h2>Article1</h2>
The first article of the document.
</article>
<article>
<h2>Article2</h2>
The second article of the document.
</article>
</section>
<footer>
Copyright © 2015 John Smith. All rights reserved.
</footer>
</body>
</html>
Links
Hyperlinks are fundamental elements of web pages that can be added to the markup as follows:
1.
Provide the basic anchor. It can be a URI of an external site such as the following:
<a href=" http://www.example.com ">
e.
or a path within your site such as the following:
<a href=" gallery/ ">
f.
Hyperlinks can also point to a document segment (identified by the id attribute) with
a fragment identifier . Here's an example:
<a href="gallery/canada.html #calgary ">
2.
Set the target (if required). External links are often intended to be opened in a new
window. Here's an example:
<a href="http://www.example.com" target="_blank" >
3.
Add a tabbing index to improve accessibility (optional).
<a href="http://www.example.com" tabindex="5" target="_blank">
4.
Ensure that external links won't affect the PageRank of your site (optional).
<a href="http://www.example.com" rel="nofollow" tabindex="5" target="_blank">
g.
Steps 2 and 4 apply for external links only.
 
Search WWH ::




Custom Search