CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr

Slides:



Advertisements
Similar presentations
Working with Images and HTML
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.
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.
LIST- HYPERLINK- IMAGES
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.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
Adding Images & Working with Images Unit 2. TITLE CORNELL NOTES TOPIC: NOTES: Name: Date:08/10/2009 Period : Summary: To display Art To display Photographs.
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
WEB DESIGN USING DREAMWEAVER. The World Wide Web –A Web site is a group of related files organized around a common topic –A Web page is a single file.
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) –
Images in HTML PowerPoint How images are used in HTML.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
Adding Image, audio and video files to web pages Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
Chapter 4 BIE1313/BPROG1203 | Web design Prepared by Mohamed Abdulkarim / Mike Ng Ah Ngan.
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”
Adding Images. XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of.
Internet Applications Development Lecture 4 L. Obead Alhadreti.
HTML Images Dr. Baker Abdalahq. The Image Tag and the Src Attribute In HTML, images are defined with the tag. In HTML, images are defined with the tag.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
Basic Webpage Design Mark-up html document with images.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
REEM ALMOTIRI Information Technology Department Majmaah University.
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.
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
HTML Structure & syntax
HTML III ECT 270 Robin Burke.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
HTML Basics.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Images in HTML PowerPoint How images are used in HTML
Inserting and Working with Images
Images, Links and Multimedia
Linking With Graphics INP150: Basic HTML March 25, 2002.
Audio and Video on the Web
Learn HTML Basics Lesson No : 10
Web Design and Development
GRAPHICS(IMAGES) Explained By: Sarbjit Kaur.
Adding Images to Your Web Page
HTML Images CS 1150 Spring 2017.
COMPUTING FUNDAMENTALS
Chapter 3 Images.
Web Development & Design Foundations with HTML5 7th Edition
Adding Images.
HTML5 Media.
Client-Side Internet and Web Programming
Graphics (Characteristics 1)
Basic HTML and Embed Codes
HTML Introduction Lecture 8.
HTML Images CS 1150 Fall 2016.
Pertemuan 1b
Attribute of heading, <p> and <hr> tag
Adding Images.
Attribute of heading, <p> and <hr> tag
Adding Images.
Adding Images.
Attribute of heading, <p> and <hr> tag
Adding Images.
Images in HTML PowerPoint How images are used in HTML
Presentation transcript:

CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi

Web Technologies and Programming Lecture 08

Adding Image, audio and video files to web pages grgf Adding Image, audio and video files to web pages

Summary of the previous lecture Internal links External links Directory Structure Internal document reference Some attributes of <a> Other type of links

Outline Adding images to web pages Using images as links Image map Adding video to web pages Adding audio to web pages

1. Adding images to web pages <img> tag is used to add images to web pages SRC attribute of the <img> tag is used to indicate the source of the image The <img> tag is empty, it contains attributes only, and does not have a closing tag.

1. Adding images to web pages Images can be added as follows We can add an image by <img src=“image-name”> <img src=“abc.jpg”>

In HTML, images are defined with the <img> tag. 1. Adding images to web pages HTML Images Syntax In HTML, images are defined with the <img> tag. The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src attribute specifies the URL (web address) of the image: <img src="url" alt="some_text">

If a browser cannot find an image, it will display the alt text 1. Adding images to web pages The alt Attribute The alt attribute specifies an alternate text for an image, if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader). If a browser cannot find an image, it will display the alt text

1. Adding images to web pages Images can be added as follows IMG stands for "image." It announces to the browser that an image will go here on the page. SRC stands for "source." This again is an attribute. It's telling the browser where to go to find the image.

1. Adding images to web pages Images supported by web .jpg .gif .png .jpeg .bmp

Image path and name Root Directory examples images ex.html img1.jpg 1. Adding images to web pages... Image path and name Root Directory examples images ex.html img1.jpg Image tag Src attribute

1. Adding images to web pages...

1.1 Attributes of <img> tag Height and width: You can use the style attribute to specify the width and height of an image. The values are specified in pixels (use px after the value): Specifies the height and width of an image <img src=“image-name” height=“100” width=“100”>

1.1 Attributes of <img> tag Alt attribute: Shows alternate text when an image is not available <img src=“image-name” alt=“image description”>

1.1 Attributes of <img> tag Align attribute: Align the image as desired <img src=“image-name” align=“left”>

1.1 Attributes of <img> tag grgf 1.1 Attributes of <img> tag Align attribute: Some values for aligned are Value Description left Align the image to the left right Align the image to the right middle Align the image in the middle top Align the image at the top bottom Align the image at the bottom

<img src="/images/html5.gif" alt="HTML5 Icon“> grgf 1.1 Images in Another Folder If not specified, the browser expects to find the image in the same folder as the web page. However, it is common to store images in a sub-folder. You must then include the folder name in the src attribute: Example <img src="/images/html5.gif" alt="HTML5 Icon“>

The GIF standard allows animated images: Example grgf 1.1 Animated Images The GIF standard allows animated images: Example <img src="programming.gif" alt="Computer Man“ >

1.1 Attributes of <img> tag … Border attribute: Add border around the image <img src=“image-name” border=“2”>

1.1 Attributes of <img> tag … Differences Between HTML 4.01 and HTML5 The following attributes: align, border, hspace, and vspace are not supported in HTML5.

1.1 Attributes of <img> tag …

1.1 Attributes of <img> tag …

1.1 Attributes of <img> tag …

1.1 Attributes of <img> tag … Align top Align middle

1.1 Attributes of <img> tag … Wrong image name

1.1 Attributes of <img> tag … Image is found Image not found

1.1 Attributes of <img> tag …

1.1 Attributes of <img> tag …

2. Using images for linking We can put images between <a> and </a > tags instead of text to link other documents or portions of the page <a href=“page-reference”> <img src=“image-srource”></a> <a href=“abc.html”> <img src=“img.jpg”></a>

2. Using images for linking…

3. Image maps Image maps allow you to add multiple links to the same image Each link can point to a different page Each of these clickable areas is known as a hotspot

3. Image maps… Defining a map: Step1 (Define a map): <map name=“map name”> <area shape=“link-shape” coords=“coordinates of link area” href=“page-reference”> </map>

3. Image maps… Defining a map: Area can contain following values Rect Circle coord

3. Image maps… Defining a map: Step2(using the map): Applying map on an image <img src=“image-title” usermap=“#map-name”>

Map name Coordinates Shape Map Area tag Link End of Map Using a map 3. Image maps… Map name Coordinates Shape Map Area tag Link End of Map Using a map Adding an Image

4. Adding videos to web pages The <video> tag is used to add a video to a web page This tag is provided in HTML5 The src attribute of the <video> tag is used to indicate the source of the video We can add a video to our page as <video src=“abc.mp4”>

4. Adding videos to web pages Videos can also be added as <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video>

4. Adding videos to web pages It supports following video formats File Format Media Type MP4 video/mp4 WebM video/webm Ogg video/ogg

4. Adding videos to web pages… Attributes of <video> tag: Auto-play Controls Height Loop

Video tag Source of the video Controls attribute Loop attribute 4. Adding videos to web pages… Video tag Source of the video Controls attribute Loop attribute Auto-play attribute

5. Adding audio to web pages… The <audio> tab is used to add a audio to a web page This tag is provided in HTML5 The src attribute of the <audio> tag is used to indicate the source of the audio We can add a audio to our page as <audio src=“abc.mp3”>

5. Adding audio to web pages… Audio can also be added as <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg">   Your browser does not support the audio tag. </audio>

5. Adding audio to web pages… Audio formats supported by audio tag are File Format Media Type MP3 audio/mpeg Ogg audio/ogg Wav audio/wav

5. Adding audio to web pages… Attributes of <audio> tag: Auto-play Controls Loop

5. Adding audio to web pages… Control In audio The controls attribute is a boolean attribute. Audio controls include: Play Pause Seeking Volume

Summary Adding images to web page Using images as links Image map Adding audio and video to web page

Summary Use the HTML <img> element to define an image Use the HTML src attribute to define the URL of the image Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed Use the HTML width and height attributes to define the size of the image Use the HTML <map> element to define an image-map Use the HTML <area> element to define the clickable areas in the image-map

THANK YOU