XHTML Louise Soe updated September 2009.

Slides:



Advertisements
Similar presentations
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Advertisements

INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
XP 1 Developing a Basic Web Site Tutorial 2: Web Site Structures & Links.
Developing a Web Site: Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down A user can select a link.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
Chapter Concepts Discuss Fonts Understand Fonts
Links and Comments.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
New Perspectives on Creating Web Pages with HTML
XP Adding Hypertext Links to a Web Page. XP Objectives Create hypertext links between elements within a Web page Create hypertext links between Web pages.
Tutorial 2 Developing a Basic Web Site
Web Structure Create Links Using HTML. 2 Objectives List different types of Web site structures and how to employ them Create element ids to mark specific.
CIS101 Introduction to Computing HTML Project Two.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 1: Developing a Basic Web Page.
Create a Web Site with Frames
Announcement #1 1 Lecture 9. Announcement #2  Midterm exam will be on Oct. 12 (Tuesday)  pm – 1.45 pm  Exam will cover all materials till Oct.
Developing a Basic Web Page with HTML
XP 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
XP Tutorial 2New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Tutorial 2 Developing a Web Site
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
CNIT 132 – Week 3 HTML (2). Working with Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down. A.
Links in HTML. Hyperlinks or links Millions of linked web pages make up the World Wide Web Used to connect a web page to another web page on the same.
Tutorial 2 Developing a Basic Web Site. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn how to storyboard various.
Web Technologies Website Development Trade & Industrial Education
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
XP Creating Web Pages with HTML, 3e1 WEB DESIGN & MANAGEMENT CLASS 5 - 2/26/02 - Agenda Homework discussions FTP issues – If you have FTP issues, please.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Informatics Computer School CS114 Web Publishing HTML Lesson 2.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
XP 1 New Perspectives on Creating Web Pages with HTML Adding Hypertext Links to a Web Page.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 4: Creating Hyperlinks Kelly L.
Website Development with Dreamweaver
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
Developing a Web Site. Web Site Navigational Structures A storyboard is a diagram of a Web site’s structure, showing all the pages in the site and indicating.
Tutorial 2 Developing a Basic Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML, CSS, and XML Tutorial 2 Developing a Web Site.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 2 1 New Perspectives on Creating Web Pages With HTML Tutorial 2: Adding Hypertext Links to.
Tutorial 2 Developing a Basic Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
Adding Links Learning Web Design: Chapter 6. Lesson Overview Using the anchor tag Linking to other pages with relative or absolute pathnames Linking to.
Developing a Basic Web Site
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
INTRODUCTORY Tutorial 6 Using Links on a Web Page.
XP 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Tutorial 2 Developing a Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
XP 1 HTML Tutorial 2: Developing a Basic Web Site.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Tutorial 3 Adding and Formatting Text with CSS Styles.
XP INFT 140 – Chapter 2 1 Developing a Basic Web Site Creating a Chemistry Web Site.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Links in HTML What you need to know….. Hyperlinks or links Millions of linked web pages make up the World Wide Web Used to connect a web page to another.
HTML Links HTML uses a hyperlink to another document on the Web.
Developing a Basic Web Site Maureen Smith Professor, Saddleback College Tutorial 2.
Developing a Basic Web Site HTML Tutorial 2. Objectives Define links and how to use them. Create element ids to mark specific locations within a document.
REEM ALMOTIRI Information Technology Department Majmaah University.
XP 1 Charles Edeki AIU Live Chat for Unit 2 ITC0381.
Creating Web Pages with Links, Images, and Embedded Style Sheets
Lecture 6, MAT 279, Fall HTML Introduction (cont.) 9/17/2009.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links.
CNIT 131 HTML5 – Anchor/Link.
HTML Introduction Lecture 8.
Tutorial 3 Working with Cascading Style Sheets
Presentation transcript:

XHTML Louise Soe updated September 2009

XHTML topics Hyperlinks Inserting graphics Text and font formatting

Hyperlinks provide navigation Structural navigation links – Menus, navigation bars, home page buttons, metaphor objects (icons), text bars Associative links within page content that link to other pages with more information Also lists of additional references Can make your site much more useful to viewer and cause them to return

Creating a Hypertext Document with hyperlinks Hypertext documents contain hypertext links (text or graphics), that link to other documents or sections of documents-- the destination of the link. Hyperlinks can point to: another section (defined by a named anchor) in the same document the same document to a different document to a named anchor in a different document to a variety of other Web objects (images, movies, etc.)

Creating Anchors The tag creates an anchor, text that is specially marked so that you can link to it from other points in a document. Text that is anchored is the destination of a link; it is not the text you click on. Each anchor has its own anchor name, using the "name" attribute i.e. Top of page. An anchor doesn’t have to be text. You can mark an inline image as an anchor. Adding an anchor does not change your document’s appearance in any way. It merely creates locations in your Web page that become destinations of links.

Creating Links to Named Anchors To create a link to an anchor, use the same tag you used to create the anchor. The tags used to create links are sometimes called link tags. Use the href attribute, which is short for Hypertext Reference, to indicate the location to jump to. href can refer to an anchor that you place in the document or to a different Web page or a resource anywhere on the Internet Note: the href attribute is case sensitive on many servers Link to an anchor using the anchor name preceded by a pound (#) symbol i.e. Top of page.

Web Site Structures Storyboarding Web pages helps determine web site structure for easy navigation. Linear structure: each page links to next Example: a news story Hierarchical structure – top down Example: Amazon.com No Structure

Structure Example: root CIS311 tutorial01tutorial02tutorial03

Linking to a Document Hyperlinks to documents use the same tag with the href attribute i.e. Contact me This hyperlink points to a document in the same folder. Hyperlink to a named anchor in another document Contact me

Linking to Documents in Other Folders Browsers assume that if no folder information is given, the file is in the same folder. When linking to a file located in a different folder than the link tag, you must include the location, or path, for the file. HTML supports two kinds of paths: absolute paths and relative paths.

Absolute Pathnames An absolute pathname in HTML provides the precise location for a file. With HTML, absolute pathnames begin with a slash (/) followed by a sequence of folders beginning with the highest level folder and proceeding to the folder that contains the file. Each folder is separated by a slash. The file name follows the final folder slash. Example: Disadvantage of absolute pathnames: If server name or parent folder name changes, have to change all of the hyperlinks

Relative Pathnames A relative path specifies the location for a file in relation to the folder containing the current document. As with absolute pathnames, folder names are separated by slashes. Unlike absolute pathnames, a relative pathname does not begin with a slash. Advantage: Relative pathnames are portable from one account to another, as long as directory structure doesn’t change

Relative Pathnames../dad.htm dad.htm is 1 folder level UP in the (parent) folder tree from the current file../family/dad.htm dad.htm is in the folder family, which is 1 folder UP the folder tree from the current file dog.htm dog.htm is in the same folder as the current file family/son.htmson.htm is in a folder 1 level down (child) from the current file

Uniform Resource Locator A URL (or URI [identifier]), specifies a precise location on the Web for a file.URI Link a URL http = Hypertext transfer protocol = Internet host name /~pets/dog.htm = directory and file name #top = named anchor

Displaying Linked Documents in a New Window By default, each Web page is displayed in the main browser window, replacing the current one Use the target attribute in the href tag to open the hyperlinked page in a new window books To create a link to an address L Soe

Inserting a Graphic cis311.gif HTML tags to insert image into a page – don’t need width and height, but loads faster. If you use incorrect width and height measurements, the image display changes, but the image size doesn’t change – enlarging dimensions may degrade image. Relative addressing – where is cis311.gif in relation to document? What does tag mean?

Special Characters Occasionally you will want to include entities or special characters in your Web page that do not appear on your keyboard. For example: registered trademark symbol ® ® or ® copyright symbol © © or © HTML supports the use of character symbols that are identified by a code number or name.code number or name

Special Character Validation W3C validation gives error messages if you use an ampersand (&) in a file path replace ampersands with & so they will validate utf-8

Obsolete Tags Won't Validate The following pages about text formatting (except for the page on heading tags) have tags that won't validate because they should be replaced by CSS (cascading style sheets)

Modifying Text Specifying the text color in the tag of a Web page changes the color of all the text on the Web page. now the text is red in the entire document Occasionally, you may want to change the color of individual words or characters. Changing the color of text is an effective way to make specific sections of text stand out.

Using the Tag The tag allows you to specify the color, the size, and the font to be used for text on a Web page. The syntax for the tag is: text size attribute allows you to specify the font size of the text color attribute allows you to change the color of individual characters or words face attribute specifies a particular font for a section of text

Examples of Different Font Sizes Typical font sizes displayed in browsers

Examples of Heading Tags and Font Sizes [lowercase!]

Changing the Font Color The color attribute of the tag allows you to change the color of individual characters or words. Specify the color in the tag by using either a color name or color value. for example, to change the color of the word "Arcadian" to the hexadecimal color value , you would enter the following HTML tag: Arcadian If there is no color specified in the tag, the default colors of the Web browser is used.

Fonts and Browsers The face attribute allows you to specify a list of potential font names. the browser tries to use the first font in the list; if it fails, it will try the second font, and so on. A generic font name should be listed last for the browser to fall back on. for example to display the word "Arcadian" in a sans- serif, enter the following HTML tag: Arcadian

Changing the Font Face The face attribute is used to specify a particular font for a section of text. The face attribute overrides the browser’s font choice. You must specify a font that is installed on the user’s computer or use generic font names: Arial, Helvetica, sans-serif Times New Roman, Times, serif Courier New, Courier, mono Georgia, Times New Roman, Times, serif Verdana, Arial, Helvetica, sans-serif

Inserting Horizontal Lines A horizontal line can improve the appearance of a Web page. not used that much nowadays The syntax for creating a horizontal line is:

Inserting Horizontal Lines The HTML horizontal syntax includes the following: align specifies the horizontal alignment of the line on the page (center, left, or right) size specifies the height of the line in pixels or percentage of the screen width width indicates the width of the line in pixels or percentage of the screen width color indicates the color of the line noshade specifies that the browser display a solid line

FTP Secure FTP Clients Open FTP program User id your CPP address Password is password Click Connect button MkDir lets you create a new directory Click MkDir to make new subdirectory with 10 random characters where you can post your 311 assignments Use Files>New>Directory in WinSCP Be sure new directory is created on server rather than local computer