Programming the Web using XHTML and JavaScript

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

Web Development & Design Foundations with XHTML Chapter 4 Key Concepts.
Chapter 5 Creating an Image Map.
Image Maps and Graphics Internet Basics and Far Beyond! Mrs. Wilson.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
Cos 125 DAY 14. Agenda Assignment #3 Graded 7 A’s, 2 B’s, 1 C Problems are mostly caused by not following the instructions Assignment 4 Posted Due March.
Hyperlinks Types of Links Link to the places in the same page Link to pages within the same site Link to the system –Caution: Will not work without.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 3: Hyperlinks and Images.
1 IMAGES: A Picture Is Worth a Thousands Words, Image Formats Image Sizes Graphic Tips Image Tag Attributes Centering Images.
Cos 125 DAY 15. Agenda Left to do 6 Assignments (9 total) One per week 3 Quizzes Capstone projects First Capstone Progress Report OverDue Feb 24 Next.
COS 125 DAY 15. Agenda Assignment 4 Posted –Due March 25 Assignment 5 posted –Due April 1 (no joke!) Left to do –5 Assignments (9 total) One per week.
Cos 125 DAY 14. Agenda Assignment #3 Graded 11 A’s, 5 non-submits Problems include Not uploading assignment sheet in WebCT Not uploading graphics to web.
COS 125 DAY 16. Agenda Second Capstone Progress Report Due March 23 (next class ) Assignment #4 assigned –Due Tuesday March 23 Exam #3 will March 26 –Castro.
COS 125 DAY 15. Agenda Second Capstone Progress Report Due Mar 24 Assignment #4 assigned –Due Thursday, March 24 Exam #3 will be on March 24 –Castro Chaps.
Chapter 6 Working with Frames.
Web-based Application Development Lecture 7 January 31, 2006 Anita Raja.
Web Design I Spring 2009 Kevin Cole Gallaudet University
Ch 5 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
IT Introduction to Website Development Welcome!
Using images with XHTML Please use speaker notes for additional information!
Informatics Computer School CS114 Web Publishing HTML Lesson 2.
Agenda Links External and Internet Links Anchor Tag Text Hyperlinks Image Hyperlinks Images Image Attributes: src, alt, width, height, align, border.
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.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Chapter 5: XHTML, Part 2 CIS 275—Web Application Development for Business I.
XHTML Louise Soe updated September 2009.
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.
Graphics Basics Two forces are always at odds when you post graphics and multimedia on the Internet. Your eyes and ears want everything to be as detailed.
Xhtml is “v5.0” An HTML v4.1 Primer chapter 4. Slide 4-2 HTML Elements  Table 4.1 > html elements — container elements — text -- open tag, close tag.
XHTML1 Images N100 Building a Simple Web Page. XHTML2 The Element The src attribute specifies the filename of an image file To include the src attribute.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Intro to HTML Part 2 Kin 260 Jackie Kiwata. Overview Links Images Lists.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
HTML Lesson 3 Hyper Text Markup Language. Assignment Part 2  Set the file name as “FirstName2.htm”  Set the title as “FirstName LastName First Web Site”
INTRODUCTORY Tutorial 6 Using Links on a Web Page.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Image Map You can define a region on your image as clickable. Add usemap=“mapname” parameter to your image. Add a tag to your html where name of map tag.
 You can also divide an image into regions that link to different documents depending on where someone clicks.  This is called an imagemap, and any.
The Web Wizard’s Guide to HTML Chapter Three Colors, Patterns, and Inline Graphics.
Basic Webpage Design Mark-up html document with images.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Text-Level Elements and Links.
Slide 1 Graphics (Characteristics 1) Images have various characteristics that affect performance Size (number of pixels) – Large images can be several.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 22 Image Maps and Interactive Forms.
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 2 Creating Links.
HTML III ECT 270 Robin Burke.
Objective % Select and utilize tools to design and develop websites.
CSE 102 Introduction to Web Design and Programming
Marking Up with XHTML Tags describe how a web page should look
CSS Layouts: Positioning and Navbars
CSS Layouts: Grouping Elements
Inserting and Working with Images
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Images, Links and Multimedia
Using Cascading Style Sheets Module B: CSS Structure
Programming the Web using XHTML and JavaScript
Objective % Select and utilize tools to design and develop websites.
Chapter 3 Images.
Web Development & Design Foundations with HTML5 7th Edition
Graphics (Characteristics 1)
Basic HTML and Embed Codes
Cascading Style Sheets™ (CSS)
Creating an Image Map.
Floating and Positioning
Project 4 Creating an Image Map.
Presentation transcript:

Programming the Web using XHTML and JavaScript Chapter 5 Images, Links, and Multimedia

Images

Displaying Images General Form <img src=“URL goes here” /> Example: <img src=“http://www.nasa.gov/multimedia/imagegallery/image_feature_73.jpg” />

Displaying Images <html> … Here is the Horsehead Nebula <img src=… /> </html> Ch05-Ex-01

Displaying Images Absolute Path Relative Path <img src “http://www.nasa.gov/multimedia/imagegallery/image_feature_73.jpg” /> Analogous to a complete house address: Tony Kombol 333G Woodward Hall 9201 University City Blvd. Charlotte, NC 28223 USA Relative Path <img src=“../pics/image_feature_73.jpg” /> Analogous to directions to get somewhere from “here” Start here Turn left at 1st stoplight Go 3 blocks Turn Right 3rd House on the left

Sidebar

Sidebar: Directories and Structure . – current directory .. – previous directory (parent) / or \ Alone or starting: Depends on operating system Typically the root directory After a directory name: find the directory and go there With http / is usually safe

Displaying Images Alternate Text Example Ch05-Ex-02 Used if image is unavailable Used by sight limited persons Note: IE and Firefox render differently Example <img src=“./pics/image_73.jpg” /> <img src=“./pics/image_73.jpg” alt=“Horsehead Nebula” /> Note: the images referenced above will be found as following: . – start in the same directory as the base HTML page /pics - go into the pics directory Ch05-Ex-02 Note: view in I.E. and Firefox

Displaying Images Inline images “In line” with the rest of text like any other character …whole bunch of text <img …> and so forth… Image typically not be the same size as text characters on the rest of the line How to align text with image?

Displaying Images Deprecated align attribute in img tag <img src=“…” align=“top”>

Displaying Images <vertical-align> property of the img element Values: bottom, middle, top baseline, sub, super, text-top, text-bottom <percentage> <style …> img {vertical-align:middle} </style> Ch 5-Ex-03 Note: view differences between IE and FF

Resume 7/13

Displaying Images Problem when text is more than just a few words: Ch 5-Ex-04 Note effect of not using the <style…>: Ch05-Ex-04a.html Not aligned Photo not resized

Displaying Images Wrapping text around image float style property Image “floats” down to next open line Text flows around one side or the other left or right values for the float property Ch 5-Ex-05

Displaying Images Centering (without flowing text) Ch 5-Ex-06 Place in a paragraph Center the paragraph Ch 5-Ex-06

Displaying Images Sizing height and width attributes in img element Units are pixels <img … height=“50” width=“50” … > Maintain aspect ratio! If you use only one the other attribute will automatically scale Ch 5-Ex-06a

Links

Creating Links External Downloads and displays a new Web page Implemented by an anchor tag with a hypertext reference: <a href=“…”>some text the user sees</a>

Creating Links Pathnames Absolute Relative Defaults http://www.nasa.gov/multimedia/highlights/index.html www.google.com Relative Attendance.htm highlights/index.html Defaults Apache: index.htm or index.html Microsoft IIS: default.htm

Creating Internal Links Create the Location (where do we want to go) <a id=“some_label”> Establish the Link (where are we now) <a href=“#some_label”>Click here</a> Internal Link Simple Identifies an internal link

Creating Links Internal links Can use Why choose ID over NAME? <a id=“some_label”> - or - <a name=“some_label”> Why choose ID over NAME? ID can be used in other tags NAME mainly valid in <a…> only Internal Link – Trickier One link to ID One link to nothing One line to an anchor <a> May work strange depending on browser

Creating Links Combined Form: url#id http://webpages.uncc.edu/~tkombol#resources

Images as Links Same format as before: <a href=“…”>some text</a> But text replaced by an img element: <a href=“…”><img src=“…” /></a> Ch05-Ex-07

Images as Links Image Maps Graphics with “hotspots” that act as links Client-side and server-side Two-step process: Define hotspots Overlay graphic with hotspots

Images as Links <map id=“map_name”> </map> <area shape=“rect” coords=“43, 70, 97, 120” href=“…” />

Images as Links Rectangle Circle Polygon shape = “rect” coords=“xl, yu, xr, yl” Circle shape = “circle” coords=“xc, yc, r” Polygon shape= “poly” coords=“x1, y1, x2, y2, … xn, yn”

Images as Links <img src=“…” usemap=“#…”> Ch05-Ex-08 NOAA US Radar

Multimedia

Multimedia <embed src=“…” /> autostart=“false” height and width align loop=“true” CH05-Ex-09

Assignment PTW Ch 5 See Assignments Web Page Grade based on: Start with code from ptw4 Copy to a new file ptw05.htm Grade based on: Appearance Technical correctness of code