and line break
tags to your document (shown in bold below) using the instructions below and over the page:
Creating Web Pages
HTML Authoring / Stage 1
University of Leeds Information Systems Services
The World Wide Web is "the universe of networkaccessible information, an embodiment of human knowledge.... W3 uses hypertext and multimedia techniques to make the Web easy for anyone to roam, browse, and contribute to."
Tim Berners-Lee, The World Wide Web, 1993
These tags can be entered using either the Design view or typed direcrtly into the Source View, as shown below.tags), or in the Code View type in the
tags as shown above. Activity 5.4 Note
tag. Comments
There are six sizes of heading in HTML;being the largest and
being the smallest.
Activity 6.1 Add the following heading tags (shown in bold below):Creating Web Pages
HTML Authoring / Stage 1
University of Leeds Information Systems Services
The World Wide Web is “the universe of networkaccessible information, an embodiment of human knowledge.... W3 uses hypertext and multimedia techniques to make the Web easy for anyone to roam, browse, and contribute to.”
Tim Berners-Lee, The World Wide Web, 1993
The heading tag is a block level element which, by default, adds a blank line immediately above and below the heading. You can therefore delete the first two
tags using the Code View. In the Design View add tags by pressing the Enter key at the start of sections HTML Authoring… and University of Leeds. Then highlighting each heading in turn select the appropriate heading type (1, 2 or 3) using the Text tab on the Insert pane. Dreamweaver will exchange the tags for the correct heading tags for you. Activity 6.2 View your document in the Design View and check the source code in the Code View. Activity 6.3
Use Dreamweaver to enter the following align attribute, shown in bold below, into the heading tags. The align attribute takes the values left, right or center. You will use the value center.Creating Web Pages
HTML Authoring / Stage 1
University of Leeds Information Systems Services
In the Document window Design View highlight the three headings and use the Property Inspector to set Centre Alignment by clicking the button .Dreamweaver will, again, automatically add the above HTML tags to the source code (check the Code View for confirmation of this action).
13
Activity 6.4
You can also centre text in the same way or by selecting the Text menu followed by Align followed by Center. This action results in the HTML shown below.Tim Berners-Lee, The World Wide Web, 1993
Activity 6.5 View the changes in the Design View and Code View. Activity 6.6 Use the Document Window to enter the followingtag in your document as shown in bold below.The World Wide Web is "the universe of network-accessible information, an embodiment of human knowledge.... W3 uses hypertext and multimedia techniques to make the Web easy for anyone to roam, browse, and contribute to."Tim Berners-Lee, The World Wide Web, 1993
Highlight the text around which you will place thetag. Select the Text menu, and Indent. Activity 6.7 Note
View the changes in the Design View and Code View. Thetag is used to enclose text as a block quotation, and is indented from the left-hand margin.
14
Task 7 Physical and Logical Formatting Tags Objective
To add physical and logical formatting tags to your document.
Instructions You will use the logical formatting tags and Comments
HTML formatting tags such as bold and italics give you control over the appearance of text in a document. Logical formatting tags and (emphasis) define the role that the text has in a sentence. The use of logical tags is now preferred to the use of physical formatting tags as they can be rendered by an audio-enabled browser used by the visually impaired by a change in the emphasis in the voice. Physical styles such as bold and italics cannot be rendered in this way.
Activity 7.1 In the Document window add the character formatting tags , and to your document, as shown in bold below:The World Wide Web is "the universe of network-accessible information, an embodiment of human knowledge.... W3 uses hypertext and multimedia techniques to make the Web easy for anyone to roam, browse, and contribute to."
Tim Berners-Lee, The World Wide Web, 1993
Highlight the appropriate text and from the Text menu select Style and then the correct character formatting tag, Bold, Italic or Underline. A small tick will appear next to your formatting choice in the Style submenu. Activity 7.2 Note
View your changes in the Code View. Some HTML tags can be nested, but ensure that an HTML tag is closed before another one is opened. For example: World Wide Web is incorrect HTML. Some browsers may not be able to format this text correctly.
Activity 7.3
View your changes in the Design View and Code View.
15
Task 8 Bulleted and Numbered Lists Objective
To add bulleted (unordered) and numbered (ordered) lists to your document.
Instructions You will add bulleted list tags...
and the numbered list tags...
with thetag. Comments
Thetag defines the start of an unordered list, and the
tag defines the start of an ordered list. The
- tag defines the items in the list.
Activity 8.1
Enter the following text (shown in bold) in the Document window and add the correct formatting tags (as shown in previous tasks using the Text menu) after the last sentence in your document:Tim Berners-Lee, The World Wide Web, 1993
WWW Browsers
Browsers are software tools that allow you to view HTML documents and also to search for information on the Internet via the World Wide Web (WWW). Here is a list of some of them:
Graphical WWW Browsers;
Netscape Navigator
Internet Explorer
Opera
HotJava
Text Only Browsers;
Lynx
Activity 8.2
Highlight the list of WWW browsers and select the Text menu, followed by List, Unordered List. This will produce a tick next to the Unordered List option. Dreamweaver will automatically alter thetags for
- tags, and introduce the
tags to the source code.
Activity 8.3
View your changes in the Design View and Code View.
Activity 8.4
Change the bulleted list to a numbered list. Highlight the list and select the Text menu, followed by List, Ordered List. This will move the tick from the Unordered List option to the Ordered List option.
16
Activity 8.5
Lists can also be nested. In the Document Window highlight the list items you wish to nest and from the Text menu choose Indent. Dreamweaver will automatically add the tags shown in bold below to the HTML code:
- Graphical WWW Browsers;
- Netscape Navigator
- Internet Explorer
- Arena
- HotJava
- Text Only Browsers;
- Lynx
Activity 8.6
View your changes in the Design View and Code View.
Activity 8.7
You can use Arabic numerals, Roman numerals, capital letters or small letters as your numbering format in your Ordered List, by inserting the attribute TYPE into thetag. (The attribute type when used in the Unordered List gives you the option to use either a disc, circle or square as your bullet.) In the Document Window enter the following attributes for Roman numerals (shown in bold below) into your Ordered List:
Place the cursor in front of Graphical WWW Browsers. From the List submenu (see Text menu) select Properties. From the drop-down list Style select Roman Large. Place the cursor in front of Netscape Navigator. From the List submenu select Properties. From the drop-down list Style select Roman Small. Place the cursor in front of Lynx. From the List submenu select Properties. From the drop-down list Style select Roman Small.
- Graphical WWW Browsers;
- Netscape Navigator
- Internet Explorer
- Arena
- HotJava
- Text Only Browsers;
- Lynx
Activity 8.8
View your changes in the Design View and Code View.
17
Task 9 Background Colours and the Font Tag Objective
To change the background colour of your document and to change the appearance of fonts.
Instructions Use the Page Properties dialog box to change the background colour of your document, and the tag for changing the appearance of fonts. Comments
You can change the size of text by using the size attribute in the tag, value 1 being the smallest, and value 7 being the largest. The default value is 3.
Activity 9.1
Select Page Properties from the Modify menu. The following dialog box will appear.
Figure 6 The Page Properties Dialog Box Activity 9.2
Click the box next to Background and choose a colour from the colour palette. View your change in the Design View and the Code View
Activity 9.3
Enter the font tag ... and its attributes size and color to the quotation at the beginning of your document. Highlight all of the following text, in the Document window: The World Wide Web is "the universe of network-accessible information, an embodiment of human knowledge.... W3 uses hypertext and multimedia techniques to make the Web easy for anyone to roam, browse, and contribute to."
18
Add the tag by selecting Text, Size, 2, followed by Text, Color, and then selecting a colour of your choice from the colour palette. Activity 9.4
View the changes you have made in the Design View and Code View.
19
Task 10 Creating Hypertext Links Objective
To create local and remote hypertext links to other HTML documents.
Instructions Use the anchor tag and create a link to the top of your document, and to a remote website. Comments
Intra-linking allows you to create links to regions within the same document. This saves users having to scroll through several screens of text.
Activity 10.1 Create a hypertext link to the top of your document. In the Document window place the cursor in front of the heading Creating Web Pages (do not highlight) and select the Insert menu and Named Anchor. The following dialog box will appear:
Figure 7 Creating an Anchor Enter a suitable name for your anchor, such as Top, and click . Activity 10.2 Go to the end of your document and type in the following text which will become your hypertext link. To Top of Page Highlight the text you have just entered. Use the Property Inspector to insert a link to the named anchor. In the Link field type #Top as shown in figure 8.
Figure 8 Creating a local hypertext link using the Property Inspector The prefix # tells a browser that the link is embedded in the current page. View the HTML Inspector. The following HTML tags will have been inserted into your document. To Top of Page Activity 10.3 Test that the link works in Netscape by first saving the document, then by selecting File menu, Preview in Browser, and Netscape to load the document into the browser and then clicking on the link. Activity 10.4 Return to Dreamweaver and create a link to Tim Berners-Lee’s home page. Highlight the words Tim Berners-Lee located after the quote in
20
your document, and in the Link field of the Property Inspector type in the following URL: http://www.w3.org/People/Berners-Lee/ Activity 10.5 Save the document and test that your link works in Netscape. Note
The Property Inspector can also be used to add many of the formatting tags already mentioned such as heading tags, paragraph tags, font type, size and style, text alignment, and list items.
21
Task 11 Using Inline Images Objective
To insert an inline image into your document and link it to another web page.
Instructions Insert the image logo.gif using thetag. Comments
NB:
There are a number attributes you can use with thetag. One of which is the alt attribute which allows you to enter alternative text. This text is displayed by browsers that are unable to display images, or if their image display option has been disabled by the user. Use of the ALT attribute is important in producing accessible web pages.
In your browser go to the University of Leeds Campusweb home page at: http://campus.leeds.ac.uk/ Place the mouse cursor over the Campusweb logo and click the right mouse button once. Choose the Save Image As… option (or Save Picture As… ) and save the image as cwlogo.gif in the same directory as your html document. Minimise Netscape.
Activity 11.1 In the Document window enter the image cwlogo.gif next to the heading University of Leeds. Place your cursor in front of the heading University of Leeds and select Image from the Insert menu. Go to your web directory, choose cwlogo.gif and click Select.
Figure 9 Inserting an inline image
22
Activity 11.2 In the Document window select the image. In the Property Inspector add a suitable description of the image in the Alt field e.g. Campusweb Logo. Select Middle from the drop-down list in the Align field. Also, add 5 to the H space field. This should give a Property Inspector similar to that shown in Figure 10.
Figure 10 The Image Property Inspector The following HTML code should have been added in the Code View:Activity 11.3 View your document in Netscape. Activity 11.4 Now create a link from the image to the University of Leeds Campusweb home page. Select the image and type the following URL for the University of Leeds Campusweb home page into the Link field of the image Property Inspector. http://campus.leeds.ac.uk/ Activity 11.5 Test the clickable image in Netscape.
23
Task 12 Signing your Document as the Author Objective
To sign your document as the author and enter an email link.
Instructions Use tags to insert your name, and include an email link in the document. Comments
You can put anything you think will be useful to readers of your page in the footer of your document, such as a contact address or a copyright notice.
Activity 12.1 In the head of the document add tags showing who the author is and when the pages were last updated. From the Insert menu, select Head Tags and Meta. This will open the Insert Meta dialog box. To add author details in the Value field type Author, and in the Content field type Your_Name. See Figure 11.
Figure 11 Inserting Meta Tags To add a date to the document select Meta again (from the Head Tags submenu of the Insert menu). In the Value field type Last Updated, and in the Content field type Today’s_Date. To add a copyright statement select Meta again (from the Head Tags submenu of the Insert menu). In the Value field type Copyright, and in the Content field type This document copyright 2002 University of Leeds. View the added code below in the HTML Inspector. Activity 12.2 Insert a horizontal rule at the bottom of the page. Place your cursor at the bottom of the page and select Insert, Horizontal Rule from the menu bar. Activity 12.3 View your changes in the Design View and Code View.
24
Activity 12.4 Insert an email address at the bottom of your document, below the horizontal rule, e.g: Email your comments to [email protected] Highlight the above text and select Text, Style, Italic, followed by Text Size, 2, from the menu bar. Highlight your email address. In the Property Inspector type mailto:[email protected] in the Link field. Dreamweaver will insert the code given below. Email your comments to [email protected]. uk Activity 12.5 View your page in the Design View . Test your email link in Netscape. Well done! You’ve just created your first HTML document. ☺
25
HTML – A Quick Reference HTML tags which have an opening and closing tag are called container tags. HTML tags which cause paragraph breaks, e.g., ,- and
are called block level elements; those that do not cause breaks e.g., , , and are called text level elements. A full description of HTML tags and browser extensions can be found using the Code Pane. Select the Reference Tab and the book O’Reilly HTML Reference.
Structure Tags ... Attributes:
version=string
... Attributes:
background=url bgcolor=colour link=colour text=colour
... Contains information about the HTML document, most importantly the document’s title.
Head Tags ... Supplies additional information about a document such as author, copyright, etc.
Hypertext Links ...
Creates a hypertext link.
... Creates a target name, as a destination for a hypertext link.
Body Content Tags ... Heading, where n is level 1, 2, 3, 4, 5 or 6 Attributes:
align=left, right or center
...For quotations ...
26
(Line Break)...
(Paragraph - closing tag is optional) Attributes:
align=left, right or center
(Horizontal Rule) Attributes:
align=left, right or center noshade size=pixels width=value or %
... Attributes:
size=1, 2, 3, 4, 5, 6 or 7 (default = 3) color=colour *for list of colours see below
Text Level Elements ...
Logical tag: for text produces italics
... Logical tag: produces bold text ...
Bold: now being deprecated
...
Italics: now being deprecated
...
Underline
...
Typewriter Style
... Strike Through Text ...
Large Text
... Small Text ...
Subscript
...
Superscript
...
Citation: usually in italics
...
Text entered by a keyboard
...
Definition
27
Lists...
- ...
- ...
Definition List Definition Term Definition
...- ...
Directory List type=bullet
...
- ...
Ordered List type=format
...
- ...
Unordered List type=bullet
Inline Image TagsAttributes:
align=type (left, right, center) alt=text border=n height=n hspace=n where n is any integer number vspace=n src=url width=n
Colours aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
Other (Comment)
Anything contained in these angle brackets will not be displayed by your browser. You can use this facility to write notes or reminders to yourself about the document. Don’t forget that users will be able to read these comments when viewing the document source in their browser.
& (special text character) e.g. © = © (copyright symbol) è = è (foreign characters)
28
Useful WWW Authoring Resources 1.
A Beginner’s Guide to HTML: http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html
2.
A guide to HTML and the WWW, covering elements of HTML Style and HTML editors is available at: http://www.hypernews.org/HyperNews/get/www/html/lang.html
3.
The World Wide Web Consortium (W3C) for the latest developments on the WWW and HTML is available at the URL: http://www.w3.org/
4.
An HTML validation service is available at the URL: This enables you to check that the HTML you have written complies with standards http://validator.w3.org/
6.
There are a number of useful Usenet newsgroups available: comp.infosystems.www comp.infosystems.www.authoring.html
ISS WWW Services •
Software support and advice
•
Programming
•
Server support
•
Database integration
•
Project work
•
Documentation (such as this guide)
•
Training (including using Macromedia Dreamweaver MX as an HTML authoring tool).
For further information on the ISS WWW Services contact: Mr. B. Diggle ([email protected])
29