60 likes | 174 Vues
Learn how to effectively link your web pages together using anchor tags and named spots. In this tutorial, we'll cover the importance of naming specific sections in your HTML files, such as evaluations, file types, and photo albums. By using the anchor tag with a name attribute, you can create internal links that navigate to different sections of your web pages. Follow the provided examples to successfully implement links in your index and unit files. Test your navigation to ensure everything functions correctly.
E N D
Links… • To link the lines in index.htm to the correct spots in we must first give names to those “spots” in unit4.htm. • Use the anchor tag <a> with a name attribute: • <a name=“spot” /> • It’s a non-container tag…
<h1>Unit 4: Web Graphics</h1> • <h2><a name="evaluation"/>Evaluation of Web Graphics</h2> • <p><a href="http://www.google.com">URL of website being evaluated</a></p> • <ol> • <li>Answer to question a</li> • <li>Answer to question b</li> • </ol> • <h2><a name="filetype"/>Graphic File Types</h2> • <p>Best file format for the five example images:</p> • <ol> • <li>answer 1</li> • <li>answer 2</li> • <li>answer 3</li> • <li>answer 4</li> • <li>answer 5</li> • </ol> • <h2><a name="album"/>Web Photo Album</h2> • <table border="8"> • The 3 spots we need to name are: • evaluation • filetype • album • These correspond to the <h2>’s in unit4.htm
Links in index.htm • To link the lines in index.htm our “spots” we use the anchor tag <a> with a href attribute • <a href=“unit4.htm#spot”> • This time you must put a closing tag </a> after the text: <a href="unit4.htm#evaluation">Evaluation of web graphics</a>
Add Links to index.htm <li><a href="unit4.htm">Unit Four: Graphics</a> <ul> <li><a href="unit4.htm#evaluation">Evaluation of web graphics</a></li> <li><a href="unit4.htm#filetype">GIF vs. JPEG</a></li> <li><a href="unit4.htm#album">Web photo album</a></li>
Rest of Today • Add the names into your unit4.htm file and the links into your index.htm. • Test the links! I will grade these tomorrow along with your web album.