Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 3: Hyperlinks and Images.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 4-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Advertisements

Iframes & Images Using HTML.
HTML Images. The Image Tag and the Src Attribute  In HTML, images are defined with the tag.  In HTML, images are defined with the tag.  The tag is.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 4: Tables and Frames.
HTML Introduction (cont.) 10/01/ Lecture 8, MAT 279, Fall 2009.
LIST- HYPERLINK- IMAGES
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 1.
Marking Up With Html: A Hypertext Markup Language Primer
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
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.
Chapter 5 Web Graphics Styling Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 3 Adding Images in HTML. Agenda Understanding Web Page Images Prepare Your Images for the Web Insert an Image Specify an Image Size Add Alternative.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
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.
Internet Vocabulary 1-21 State Test Vocabulary. Address address, Internet address, and web address. A code or series of letters numbers and/or.
CSCE Chapter 5 (Links, Images, & Multimedia) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
Images Inserting an image on a web page. chcslonline.org2 ITEMS REQUIRED Go to the course download page on the course website and download the 3 images.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 4: Creating Hyperlinks Kelly L.
Images in HTML PowerPoint How images are used in HTML.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
HTML 4 Foundation Level Course HyperText Markup Language Most common language used in creating Web documents. You can use HTML to create cross-platform.
Chapter 5 Web Graphics Styling Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Images & Image Maps 16 th February. Images & Image Maps Web authors can add icons, logos and high impact images to their pages Images enhance web pages.
HTML and XML Behind Web Authoring Tools. 2 Objectives Introduce HTML Learn HTML Step by step Introduce XML.
Computer Images Can store color info about each pixel, but makes file BIG Compression for Web 15.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 12 This presentation © 2004, MacAvon Media Productions Hypertext and Hypermedia.
INTRODUCTORY Tutorial 6 Using Links on a Web Page.
XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.
WEB DESIGN AND PROGRAMMING Introduction to XHTML.
FILE TYPES FOR WEB DESIGN 1 HOW SHOULD I SAVE?. GRAPHICS INTERCHANGE FORMAT (GIF) Best used for flat-color, sharp-edged art or text Clip art, logos Compression.
HTML (Hyper Text Markup Language) Lecture II. Review Writing HTML files for web pages – efficient compact – fundamental. Text files with htm extension.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Introduction to XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg.
HTML Chapter 4 Source: CSE 190 M (Web Programming) lecture notes, es/slides/lecture02-basic_xhtml.html.
Kevin Murphy Images and Web Pages Masters Project CS 490.
Introduction to Web Site Development John Hurley Department of Computer Science California State University, Los Angeles Lecture 4: Favicons Tables and.
Slide 1 Graphics (Characteristics 1) Images have various characteristics that affect performance Size (number of pixels) – Large images can be several.
REEM ALMOTIRI Information Technology Department Majmaah University.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
HTML Overview.  Students will learn: How HTML tagging works How browsers display tagged documents How an HTML document is structured.
Lecture 8 Introduction to Web Programming. Announcement  First In-class exam will be on Oct. 10 (Wednesday)  2.50pm – 4.05pm  Exam will cover all materials.
TNPW1 Ing. Jiří Štěpánek.  Tags  Marks for elements ▪ Pair ▪ Start and end tag ( Paragraph text ) ▪ Single ▪ Only start tag, according to XHTML 1.0.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 4.
HTML III ECT 270 Robin Burke.
Images in HTML PowerPoint How images are used in HTML
Images, Links and Multimedia
Hosted by Coach Slanina
Chapter 1: Introduction to XHTML (part 1)
Chapter 4 - Introduction to XHTML: Part 1
HTML Images CS 1150 Spring 2017.
COMPUTING FUNDAMENTALS
Chapter 3 Images.
Graphics (Characteristics 1)
Basic HTML and Embed Codes
HTML Introduction Lecture 8.
Introduction to HTML- Basics
HTML Images CS 1150 Fall 2016.
Pertemuan 1b
Hyperlinks, Images, Comments, and More…
Images in HTML PowerPoint How images are used in HTML
Presentation transcript:

Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 3: Hyperlinks and Images

The A Element (Basics) Use the anchor element to define hyperlinks A hyperlink is a reference to an external document such as another HTML page, image, movie, etc. The content of the anchor element must be phrasing content You cannot have a P element inside an A element because P is flow content You can have an IMG element (covered later) inside an A element because an image is phrasing content

The A Element (Syntax) Description Used to define a hyperlink (hypertext anchor). Comments Start Tag: REQUIRED End Tag: REQUIRED Self-Closing Tag: FORBIDDEN Example Yahoo!

The A Element (Attributes) Optional Attributes HREF: Specify the destination anchor TARGET: Specify where (in what browser window) to open the hyperlink document TITLE: Specify a tool tip when the mouse hovers over the anchor text

Linking to Specific Locations In your destination document, define a location to link to using the ID attribute Example: This is a paragraph with an ID. In your source document, define a hyperlink to the destination document, appending an #id to the URL Example: Security Link

Absolute URLs Full URL, including protocol, hostname, path and filename (optional) image

Relative URLs A URL that is relative to a base URL./ = base URL directory../ = parent directory / = replaces everything from path onwards // = replaces everything from hostname onwards

Images A rectangular array of pixels Bitmaps (Map of bits) Pixmaps (Map of pixels) Images tend to be quite large so compressed formats are quite common, especially on the web Some compression techniques include Color reduction Frequency analysis

Web-Friendly Images Joint Photographic Experts Group (JPEG) JPG, JPEG, JP2 extensions Variable loss format Graphic Interchange Format (GIF) GIF extension Lossless format Portable Network Graphic (PNG) PNG extension Lossless format

The IMG Element (Basics) The IMG element can be used anywhere flow, phrasing and embedded content are expected For example: Within BODY and LI elements (flow content) Within P, B, and I elements (phrasing content) Basically, you can put images almost anywhere

The IMG Element (Syntax) Description Marks embedded image content. Comments Start Tag: REQUIRED End Tag: FORBIDDEN Self-Closing Tag: YES (XML syntax) Example

The IMG Element (Attributes) Required Attributes SRC: URL to specify location of image ALT: Alternative text (called fallback content) Non-required Attributes USEMAP: Associates an IMG with a MAP TITLE: Associates an IMG with a tool tip

Images and Hyperlinks The IMG element is phrasing content, and can therefore be a child of the A element Example:

The MAP Element (Basics) The MAP element can be defined anywhere flow and phrasing content is expected (in BODY, P, etc.) The MAP element defines an image map An image map is a set of clickable regions (areas) on an image that can be associated with hyperlinks Every MAP must contain zero or more AREA elements

The MAP Element (Syntax) Description Used to define an image map. Comments Start Tag: REQUIRED End Tag: REQUIRED Self-Closing Tag: FORBIDDEN Example

The MAP Element (Attributes) Required Attributes NAME: Associates a MAP element with a named identifier. This named identifier is used by the IMG element to associate it with a particular map. Names are referenced by IMG using hash-name references (# sign followed by the named identifier) Example:

The AREA Element (Basics) The AREA element specifies a region of an image that is associated with some text, a hyperlink, or a dead area Text: ALT (fallback) text Hyperlink: AREA has a hyperlink (HREF) attribute Dead Area: AREA with no HREF or ALT text

The AREA Element (Syntax) Description Marks a clickable region of an image map. Comments Start Tag: REQUIRED End Tag: FORBIDDEN Self-Closing Tag: YES (XML Syntax) Example

The AREA Element (Attributes) Optional Attributes HREF: Specify a hyperlink to go to when an area is clicked on ALT: Alternative (fallback) text SHAPE: Shape of area (circ, default, poly, or rect) COORDS: List of image coordinates TITLE: Tool tip displayed when mouse hovers over area

Associating Maps to Images We need to associate an image with a map Give the MAP a NAME attribute Use the USEMAP attribute of the IMG element Reference the name using a Hash Name Reference Example