CIS195 Web Authoring 1: HTML

Site Design and More on Hyperlinks

Topics by Week for the Ten-Week Term
1. Intro to HTML 6. Layout with CSS
2. More HTML, file paths 7. CSS Flexbox and Grid
3. Site structure and navigation 8. HTML Forms
4. Formatting with CSS 9. Multimedia
5. Midterm, Project Propposal 10. Tables, Project Completion
11. Final

Contents

Website Structure

The organization of the code is determined by folders (directories).
The web site's structure is determined by hyperlinks.

 

A sitemap shows how the web pages are linked together. It can be done simply by using an outline.

Here's an example based on a market garden web site, Eaglewing Acres.

 

For a site with more complex navigation (hyperlinks) you would need a more complex map. Look at The Highlands web site and draw a site map on the white board.

 

<nav> is a structural element. It can be used to identify a set of links to be used for navigating the web site.

 

The anchor element, <a> , can have a target attribute that is used to control where the linked page opens. Here are the possible values:

ValueWhere the linked document is opened
_blankIn a new window or tab
_selfIn the same frame as the anchor that was clicked (default)
_parentThe parent frame
_topThe full body of the window
framenameA named frame

Example:

W3Schools tutorial on the anchor element

 

The tag sets a default path for all the href and src attributes on the page. It should be put in the element.

Example:

W3Schools tutorial on the base tag

 

Mark the target with the id attribute

To link to a location within a document, you first need to mark that location. You can do that with the id attribute.

Use the id as an href

Just prefix the id name with a # so the browser will know it's a link to an id.

Linking to an id inside another page

 

Images can be used as links. Just enclose the <img> element in anchor tags.

You can use an e-mail address in a hypertext link so that when a user clicks the link, the user’s e-mail program opens and automatically inserts the address into the “To” field of the new outgoing message.

The mailto protocol allows you to add information to the e-mail, including the subject line and the text of the message. Spaces are replaced with the %20 character code since URLs cannot contain blank spaces

More about the href attribute on W3Schools

 

Reference

Creating Hyperlinks—MDN Web Docs

 


Creative Commons License Web Authoring Lecture Notes by Brian Bird written 2017, revised , are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.