HTML III ECT 270 Robin Burke.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide to HTML Chapter Five Working with Images.
Advertisements

Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
Working with Images and HTML
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Web Development & Design Foundations with XHTML Chapter 4 Key Concepts.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Introduction to HTML Lists, Images, and Links. Before We Begin Save another file in Notepad Save another file in Notepad Open your HTML, then do File>Save.
1 IMAGES: A Picture Is Worth a Thousands Words, Image Formats Choosing an Image Format Image Sizes Bits Per Pixel Graphic Tips Image Tag Attributes Line.
Images & Tables. Three graphic file types are supported by today's browsers: GIF - Graphic Interchange Format JPEG - Joint Photographic Experts Group.
Tutorial 3 Designing a Web Page.
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.
Instructor: A. Burns 1 HTML Images. Instructor: A. Burns 2 Inserting a Graphic Images can be displayed in two ways: as inline images or as external images.
AdvWeb-1/12 DePaul University SNL 262 Web Page Design Chapt 10 - Putting Graphics on A Web Page Instructor: David A. Lash.
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.
Web Graphics Image File Formats Image optimization Accessibility issues Using images and colors on the web.
Colors, Images, & Image Maps. Working with Color Colors are defined in terms of RGB Triplet –Red, Green, Blue –0 to 255 in intensity –(00, 00, 00) is.
Graphic images for computers Stored in files of binary data - Binary blobs Software has to know the binary format to decode the file and render an image.
HTML Boot Camp: Rules and Images
HTML II ECT 270 Robin Burke. 2 Outline Review Images text flow links Image maps Colors Tables.
Copyright © 2003 Pearson Education, Inc. Slide 4-1 Created by, Stephanie Ludi, Rochester Institute of Technology—NY Basic Web Page Construction Graphics.
1 Mastering the Internet and HTML Images and Image Tags.
CSCE Chapter 5 (Links, Images, & Multimedia) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department.
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) –
Department of Information Technology Chapter 8 - Creating Hypertext links Lecturer: Ms Melinda Chung.
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.
1 Lesson 3 Power Techniques HTML and JavaScript BASICS, 4 th Edition Barksdale / Turner.
Computer Science 101 Images in Web Pages. Image Files Two common formats, GIF and JPEG GIF images are more flexible for use as icons JPEG images are sharper.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 4 Key Concepts.
Adding Images Learning Web Design: Chapter 7. Using an Image Images have many purposed on a Web site Used as a static image To add illustration: ex. A.
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.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Internet Applications Development Lecture 4 L. Obead Alhadreti.
HTML. Adding Background Color The bgcolor attribute lets you change the background color of the Web page. Located in the body tag See common Web Page.
The Web Wizard’s Guide to HTML Chapter Three Colors, Patterns, and Inline Graphics.
Kevin Murphy Images and Web Pages Masters Project CS 490.
Introduction to Programming the WWW I CMSC Winter 2004 Lecture 3.
Web Page Design Mrs. Ricke. Graphics Interchange Format 256 colors only Good for icons, clipart, logos Not good for high quality pictures.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
1 2/22/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Images and placing pages on the server.
So far  Reviewed CSS  Added a table  3 rows  Copy/paste from course syllabus Anchorsandlists.pptx 01/22/2016.
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.
WEB GRAPHICS EXPLORING COMPUTER SCIENCE - LESSON 3-4.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 4.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 4.
Images.
Images.
Inserting and Working with Images
Images, Links and Multimedia
Tutorial 3 – Designing a Web Page
Introduction to Programming the WWW I
BIS 4226 HTML (Part 2) Joseph Lee
Chapter 3 Images.
Web Development & Design Foundations with HTML5 7th Edition
Graphics (Characteristics 1)
Introduction to HTML II
Images.
Basic Web Design Principles
Exploring the Internet
Lesson 7: Video, Audio and Image Techniques
Exploring the Internet
Project 4 Creating an Image Map.
Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements
Hyperlinks, Images, Comments, and More…
Presentation transcript:

HTML III ECT 270 Robin Burke

Outline Images basics text flow links Image maps Colors

Image tag Inline image: a picture file that is referenced in the HTML code and is loaded with the HTML file. <img src ="photo.jpg"> src attribute URL is usually relative Can be a different site <img src="http://www.doubleclick.net/..."> often seen in advertising banners

More image tag attributes height: specifies the height of the image in pixels width: specifies the width of the image in pixels border: determines the size of the border alt: specifies the text displayed on-screen when the image cannot be loaded align: enables text to flow around the image: Used to flush the image to the right or left of the page. Vertical options (top, middle, bottom) control where text adjacent to an image is aligned.

Image scaling Setting height and width helps the browser but be careful Wrong choices lead to distorted images IE trick for getting image size Also browser downloads whole images for thumbnails, shrink in image program

Image media In-line = supported by the browser so they are rendered by the browser itself modern browsers support GIF (Graphics Interchange Format) JPEG (Joint Photographic Experts Group) PNG (Portable Net Graphics) External = other formats user must have a plug-in or alternate application to render the image

Image file formats GIF (Graphic Interchange Format) To display clip art containing < 256 colors To create animated graphics To use transparent colors JPG (Joint Photographic Expert Group) To display photographs To use images containing >256 colors To reduce the size of the image through file compression PNG (Portable Net Graphics) A replacement for GIF Compressed More color depth α transparency

Image download process You might wonder how the images get to the browser they are separate files not part of the HTML file the user requests Images are download in separate requests during page rendering this was the Mosaic innovation

Image download User requests page Server responds with page Browser begins to render the page Browser discovers img element Browser sends request to server for image file Server responds with image file Browser renders image file Browser renders the rest of the file

Image download, actual User requests page Server responds with page Browser begins to render the page Browser discovers img element Browser start download process Browser continues rendering rest of page Browser sends request to server for image file Server responds with image file Browser renders image file

Image sizing Providing height and width lets the browser work in parallel with downloading without having to redraw later

Bandwidth Image files are larger than text files Use more network resources (bandwidth) Users who access the Internet via telephone lines will have to wait for image files estimate 7K / sec or less Use image files no larger than 30-40KB especially on heavily used pages Use "alt" text to describe images for users with image loading turned off

Battling Bandwidth Limitations Width and height. Don’t put large images at the top of a Web page Use interlaced GIFs and progressive JPGs. Several shareware graphic programs save GIF or JPG files in convenient formats: Paint Shop Pro or GIF Wizard Use thumbnails – reduced versions of your image

Image maps Example This is different from a image link http://www.metrarail.com/maps.html This is different from a image link image link = whole image, one destination image map = part of image, multiple destinations

Basic idea Large image Identify "hotspots" always rectangular geometric regions associate each with a URL

Metra HTML source <IMG SRC="Stock/metra-system-map04-2003.gif" WIDTH=593 HEIGHT=1000 BORDER=0 ALT="" USEMAP="#metra_system_map04_Map"> <MAP NAME="metra_system_map04_Map"> <AREA SHAPE="poly" ALT="South Shore" COORDS="561,811, 591,811, 591,834, 560,834" HREF="http://www.nictd.com/" TARGET="_blank"> <AREA SHAPE="poly" ALT="Metra Electric Line" COORDS="515,640, 521,658, 525,670, 527,685, 515,759, 511,783, 495,785, 494,797, 509,798, 446,931, 424,972, 420,987, 440,995, 446,987, 446,975, 523,812, 545,822, 553,805, 536,804, 530,788, 540,720, 545,721, 555,755, 579,754, 568,730, 561,707, 545,703, 547,669, 529,645" HREF="http://metrarail.com/Sched/me/me.html#MAP"> ...

HTML In the image <map> element <area> element usemap attribute URL for the map element to use <map> element contains <area> elements <area> element associates geometric shapes and URLs

Structure <map name=“mapname”> <area shape=shape coords=“coordinates” href=“url” target=“window”> ... more areas ... </map> <img src=“photo.jpg” usemap=“#mapname”>

Shapes rect circle poly rectangular region pixels for top left corner and bottom right circle circular region pixels for center, radius poly arbitrary number of vertices

Shape examples X1=53 x2=162 x=273 y1=83 y2=180 y=131 r=36

Identify regions Graphics program Image map utilities ISMAP trick MapEdit on book CD ISMAP trick put the attribute "ismap" in img tag put inside an anchor element

Image map example Yahoo logo

Colors Color is an important part of a UI already important for the web (link colors) Can be crucial to good design can be detrimental if misused Used many places in HTML in body element bgcolor sets background color for the whole page bgcolor="blue" Long list of legal color names

What if I want my own color? Not restricted to the "named" colors RGB triplet red/green/blue values 0-255 represented in hexidecimal But on systems with 8-bit color only 216 colors available "Netscape" or "web-safe" palette

What if I use a non-web-safe color? The browser tries to approximate the color using dithering sometimes OK, usually ugly The good news 8-bit color is going away

How to specify bgcolor="#FFFFFF" # means that a triplet is coming FF = 255, F = 15 hex FF = 15*16+15 white

Examples

Coloring things page colors table cells other spans of text background main text links unvisited visited being clicked table cells text other spans of text font element

Link colors Defaults A bit problematic new links = blue visited link = red active = no color change A bit problematic old stuff stands out but people are used to this solution: make visited links purplish less distracting

Designing colors MS Paint + Windows calc Web tools http://www.hypersolutions.org/pages/colorSel.html http://www.bagism.com/colormaker/

Examples