Images in web pages. Images Why do we use images? They add interest, and keep the user from being bored They convey information –Charts are easier to.

Slides:



Advertisements
Similar presentations
Chapter 4 Adding Images. Inserting and Aligning Images Graphics refer to the appearance of most non- text items on a web page, such as: – Photographs.
Advertisements

Iframes & Images Using 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.
Web Site Development Test 2 Working in DreamWeaver.
Chapter 17 Creating Images for the Web. Chapter Lessons Learn about Web features Optimize images for Web use Create a button for a Web page Create slices.
Add Images to Improve Your Presentation Day 8. You will learn to Understand Graphics Formats Find Graphics Create Your Own Images Insert an Image on Your.
Tutorial 3 Designing a Web Page.
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.
Chapter 4 Adding Images. Inserting and Aligning Images Using CSS When you choose graphics to add to a web page, it’s important to use graphic files in.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Chapter 5 Web Graphics Styling Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Graphics Ms. Brewer Spring Bellwork Edmodo – log on! Quiz? Take it if you need to! Policies and Procedures Powerpoint in Shared Folder! Get to Know.
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.
Chapter 14-Designing for the World Wide Web. Overview Introducing multimedia on the Web. Designing text for the Web. Creating images for the Web. Adding.
Tutorial 3: Working with Images. Objectives Session 3.1 – Identify the differences among image file types – Evaluate the purpose of alternative text –
Web Graphics Image File Formats Image optimization Accessibility issues Using images and colors on the web.
Chapter 4 Adding Images. Chapter 4 Lessons Introduction 1.Insert and align images 2.Enhance an image and use alternate text 3.Insert a background image.
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
XHTML Images. Images are important Purpose: to enhance your web site. Add only when they complement or add additional impact to your message.
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.
Chapter 6 Images in Dreamweaver & Fireworks Mrs. Johnson Web Design.
 Scaling an image is resizing the image in a graphic editing software so it is the proper size before adding it to a site.  Important NOTE: If you insert.
CIT 256 Dreamweaver Intro. Dr. Beryl Hoffman. Start Dreamweaver Start from Start Menu/Adobe Master Collection CS6/ Adobe Dreamweaver CS6 Choose Create.
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) –
Images in HTML PowerPoint How images are used in HTML.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
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.
Images. The Element To place an image on our web page, we use the self-closing element: The src attribute ("source") is required and supplies the name.
8 Using Web Graphics Section 8.1 Identify types of graphics Identify and compare graphic formats Describe compression schemes Section 8.2 Identify image.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 4 Key Concepts.
Graphics in HTML. Graphics  Question: How does a web page include graphics?  Are the graphics included in the HTML file or separate files?
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.
+ 5 Things you need to know about images* *Images for the web.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
Macromedia Dreamweaver MX 2004 Design Professional And Graphics WORKING WITH TEXT.
Unit 1: Task 1 By Abbie Llewellyn. Vector Graphic Software (Corel Draw) Computer graphics can be classified into two different categories: raster graphics.
Project Two Adding Web Pages, Links, and Images Define and set a home page Add pages to a Web site Describe Dreamweaver's image accessibility features.
Macromedia Dreamweaver 8 Revealed AND GRAPHICS WORKING WITH TEXT.
Web Graphics. Web graphics Bandwidth is king Graphics must load quickly Graphics must be optimized All other components except for text, gif and jpg are.
WRA 210: 10/7/13 IMAGES. TODAY’S AGENDA Reminder about Module 8 - test your links!Module 8 Overview of hierarchies, naming How images work on the web.
1 2/22/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Images and placing pages on the server.
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.
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
13 June – Session : Graphics Different types of Graphics for the web Features of image editing software Good practice for image editing.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 4.
Exploring Computer Science - Lesson 3-4
Images.
Images.
Exploring Computer Science - Lesson 3-4
Inserting and Working with Images
DW Tutorial 5 Sessions 5.1 & 5.2 REVIEW
Exploring Computer Science - Lesson 3-4
Web Development & Design Foundations with HTML5 7th Edition
Graphics (Characteristics 1)
Images.
Images.
DREAMWEAVER MX 2004 Chapter 4 Working with Images
Creating Images for the Web
Images.
Presentation transcript:

Images in web pages

Images Why do we use images? They add interest, and keep the user from being bored They convey information –Charts are easier to understand than tables of figures –Photographs give sense of processes or locations better than words –Logos remind us of corporate identity –Icons convey functional meaning Some images are invisible! –Eg “shims” to create space

Images We can add images to our HTML pages using an image tag. An image tag has several attributes, some of which are mandatory, and some that are optional. The image tag is an empty tag (similar to the tag). We simply insert an image, and don’t need to tell the browser where the image ends.

IMG Src= the source URL of the image, or the path to it Width and height attributes tell the browser how much space to allow

Measurements Width and height are measured in –Pixels, or –Percentage of page size Note that attributes take “quotation marks” You can force an image to cover the page background by using “100%”, but –Small images enlarged by instructions to the browser display as poor quality –Large-enough images to give good quality will be slow to download over slow connections/modems –The browser uses time and processor power to manage resizing

IMG Sometimes you want a border round an image, but more often you don’t –This example is a “spacer” making white space on the page, so does not need a border –Borders are measured in pixels –Again, attributes take “quotation marks” Be careful that the quotation marks in your HTML are “straight quotes” not the “curly quotes” shown here or in Word

ALTernative text alt=“ ” Use the ALT tag to provide alternative text for your image. –Text is displayed by the browser when you mouse over the image –While loading (and if it doesn’t display at all) it is represented as a small text box –Empty ALT tag alt=“ ” tells a screenreader to skip the image –Lack of ALT tag forces a screenreader to tell the user there’s an image - because there’s no way of knowing how important the image may be.

ALTernative text Good ALT tags tell users more about your images even if they are fully sighted Keep ALT tags short and informative –Alt=“road blocked by fallen trees”

Images Positioning images on the page can be done with the ALIGN attribute, but –Like many older HTML tags this is deprecated and the use of style sheets is preferred <!-- img { padding: 10px; float: left; position: static; } -->

Image controlled using CSS

Image Maps hot spotsAreas of an image can be defined as hot spots These enable the browser to hyperlink to other pages or areas

Image Maps Useful for “cheap and cheerful” buttons –make a simple background in Photoshop Dreamweaver makes image mapping easy –no “user feedback” other than the hyperlink cursor “finger” and the jump to new content Defining the co-ordinates for it by hand is tedious

Image Map example These are set up as hot spots

Image Map example  Clicking on the mapped hot spot activates the hyperlink and loads a new page

Image types Characteristics, advantages and disadvantages Vector images –“Line” drawings, computer graphics Bit-mapped or raster images –Photographs, “painted” images

Vector images Define areas or lines mathematically Scalable without loss of definition File sizes do not increase with image size Often look artificial, “computer generated” – which may be what you need Small file storage Best-known web format is Flash (exported as.swf) New standard – Scalable Vector Graphics or.svg – slowly being supported

Vector image examples Scalable without loss of definition Clip art file,.wmf format Clip art file,.cgm format

Bitmapped (raster) images Define each pixel in terms of colour, intensity and position Not just Windows “Bitmap” format.bmp (though this is a bitmapped format).jpg,.gif or.png used on Web JPG and PNG can look subtle and lifelike Potentially LARGE files; 2 x larger image requires 4 x larger storage and up- and down- load time Compression techniques can make file sizes smaller, but often at cost of loss of data Small images don’t scale up well

Bitmapped: GIF Graphics Interchange Format.gif supports 256 colours.gif 89a format supports transparency –Good for buttons and other non-rectangular shapes Supports compression Not very realistic for photos with thousands of colours

GIF images Small images don’t scale up well

Bitmapped: JPG or JPEG Joint Photographic Experts Group Supports millions of colours Excellent for photographic reproduction –Realistic colour owing to wide range Good compression, but algorithm discards data (lossy) –So always keep a high quality version separately from the web version

JPG images

Bitmapped: PNG Portable Network Graphics Fireworks’ native format Supports millions of colours Supports transparency Reasonable compression –But can make larger files than.gif or.jpg Increasing browser support –Not all features work correctly in older browsers

PNG images

Optimising Many Internet users still have low bandwidth access Images are useful, but have disadvantages Most browsers only support GIF, JPG and PNG –only Internet Explorer supports.bmp

Optimising – a practical example Define your expected screen minimum (eg 800 x 600px) Deduct 40px for scrollbars = 760px Define any menu width, eg 1/5 of screen width = ~150px Remainder (610px) is available for content Decide site policy, eg “Always leave half the space for text” – 610 / 2 = 305 Therefore images should be less than 305 px wide

Optimising Resize your chosen image to 305 px wide (in this case) –Most photo editor programs link proportions, so the height will adjust “Save As” (or “export” or “save for web”) a new copy –using a web friendly format (.jpg,.gif,.png) Apply compression –High compression = lower quality = smaller file size = faster up/download –Low compression = higher quality = larger file size = slower up/download Save to image folder with suitable name eg “house_sml.png” –Try to avoid spaces in filenames as some servers won’t handle them KEEP the original safely among source materials for the site