0 index
1 Tags related to linking
2 Link Examples
3 Simple Hypertext Links
4 Absolute URLs
5 Relative URLs
6 Adding Images to Your Page
7 How Graphics Can Be Used
8 Linking graphics
9 Specifying width and height
10 Inline and External Graphics
11 How to Stop Text Wrapping
12 Images as a Positioning Tool
13 Image Maps
14 Image Map Example

outline
created using slideshow.cgi by Andy Harris















CSCI N241 Web Design: Creating Links
1. Tags related to linking
  • <a>:…..</a> - defines an anchor within a document.
  • An anchor is used to link to another document



































CSCI N241 Web Design: Creating Links
2. Link Examples
  • <a href = "filename.html">…</a> - links to a local file
  • <a href = "http://www.cs.iupui.edu/~aharris.html">…</a> - links to an external file



































CSCI N241 Web Design: Creating Links
3. Simple Hypertext Links
  • The anchor <a> tag is used to identify a string of text or an image that serves as a hypertext link to another document
  • Example:
    A link to <a href = "http://www.cs.iupui.edu/~aharris">Andy's page </a>



































CSCI N241 Web Design: Creating Links
4. Absolute URLs
  • Contains the following components
    - a protocol identifier (http)
    - a host name (the name of the server machine)
    - the pathname
    - a specific file name
  • <a href = "http://www.cs.iupui.edu/~aharris.html">…</a>



































CSCI N241 Web Design: Creating Links
5. Relative URLs
  • Provides a pointer to another document relative to the location of the current document
  • If within your web page you can use a relative link, such as,
    <a href = "talk.html">…</a> which links directly from your page to a file talk.html in your public_html directory



































CSCI N241 Web Design: Creating Links
6. Adding Images to Your Page
  • <img src = URL> - displays the graphic that the URL defines
  • <img src = URL
    alt = text> - places alternative text that appears when the image is not displayed



































CSCI N241 Web Design: Creating Links
7. How Graphics Can Be Used
  • As a simple graphic
  • As a link
  • As an imagemap
  • As spacing devices



































CSCI N241 Web Design: Creating Links
8. Linking graphics
  • To make a graphic a link, place anchor tags around the image tag
  • Example:
    - <a href = "document.html"><img src = "picture.gif"></a>



































CSCI N241 Web Design: Creating Links
9. Specifying width and height
  • The width and height attributes indicate the dimension of the graphic in pixels.
  • Example:
    - <img src = "face.gif" width = 50 height = 50>
  • This information allows the browser to lay out the page before the graphics download.
  • Otherwise the page is redisplayed a second time with the graphics in place.



































CSCI N241 Web Design: Creating Links
10. Inline and External Graphics
  • Inline graphics uses the <img src> tag to display the image on the page
  • External graphics uses the <a>...</a> tag to link to the graphic. This allows the user to click on the link if they want to see the graphic.



































CSCI N241 Web Design: Creating Links
11. How to Stop Text Wrapping
  • Text automatically wraps to fill the space along the side of an aligned graphic.
  • To stop text wrapping insert a <br> with a clear attribute using one of three values (left, right, and all)
  • Example:
    <br clear = right> to begin the text below the graphic



































CSCI N241 Web Design: Creating Links
12. Images as a Positioning Tool
  • This line is made with a red gif that is one pixel by one pixel. By using a height and width attribute you can manipulate the image.
    this moves the text by manipulating the same image with the height and width attributes (h = 10, w = 70)



































CSCI N241 Web Design: Creating Links
13. Image Maps
  • An imagemap is a single graphic with multiple "hotspots" that link to other documents
  • The graphic is an ordinary inline image
  • The "magic" is the result of special coding and map files that link pointer coordinated with their respective URLs



































CSCI N241 Web Design: Creating Links
14. Image Map Example





































outline

Tags related to linking

Link Examples

Simple Hypertext Links

Absolute URLs

Relative URLs

Adding Images to Your Page

How Graphics Can Be Used

Linking graphics

Specifying width and height

Inline and External Graphics

How to Stop Text Wrapping

Images as a Positioning Tool

Image Maps

Image Map Example