SlideShare a Scribd company logo
HTML Graphics

HTML Graphics
1

What are the commonly used image file formats on the Web? Describe them.
The three most widely accepted image file formats on the Web are: .GIF, .JPG, and .PNG. All of the
formats compress the images to create smaller files that download much more quickly than the
original image.
GIF - Graphics Interchange Format
GIF uses a compression technique that preserves all of the color information for the image.
The .GIF format has an 8-bit color depth that allows for the use of 256 colors (as 28 = 256).
The fewer the number of colors that are used in a .GIF file, the greater the compression and the
smaller the file size.
The .GIF file is ideal for line art and color graphics because it is excellent at compressing and
displaying flat color areas.
It uses a simple compression algorithm.
Because of the color depth limitation, however, the .GIF format is limiting and should not be
used for photographs or complex graphics that have gradation in colour.
GIF Transparency:
With GIF files we can choose one color in an image to appear as transparent in the browser
The background color or pattern will show through the areas that we marks as transparent.
Using transparent areas allows us to create graphics that appear to have an irregular shape instead
of a rectangle.
GIF Animation
The .GIF format allows a designer to store multiple images and timing information about the
images in a single file.
This allows the creation of animations consisting of multiple static images that rotate, creating
the illusion of motion.
When creating a GIF animation, a designer can adjust the amount of time between frames and the
number of times that the animation plays.
GIF animation does not require browser plug-ins and does not have large download times.
Some of the tools through which we can create GIF animation are: ULead GIF Animator, and
Microsoft Liquid Motion.
Disadvantages of animated GIF images:
They only support 256 color palette.
They can only animate in browsers that support animated gifs.
They cannot be edited once they are encoded as an animated gif. If we edit animated GIF, we
will lose the animation sequence when it is saved.
JPG - Joint Photographic Experts Group (JPG or JPEG) image file format.
JPGs support millions of colors since they are 24-bit, so they are ideal for photographs or
continuous tone images.
JPGs use a lossy file compression technique that discards some colors, so there may be a loss of
quality from the original image.
The compression algorithm is more complex for JPG files.
When saving an image in .JPG format, a slider lets the designer choose the quality of the image.
The higher the compression, the smaller the size of the image file and the quicker the download
time, but the lower the image quality.
Images can be converted into JPG format using tools such as Adobe PhotoShop.
This format is not suitable for images with text and large blocks of solid color, and simple shapes
with crisp edges. This is because when the image is compressed the text, color or lines may blur
resulting in image that is not as sharp.

Prof. Mukesh N. Tekwani

Page 1 of 4
HTML Graphics

PNG - Portable Network Graphics format
This was specifically designed for use on the Web.
It has better compression rates than GIF images and therefore images are smaller in size.
It uses a compression technique that retains all of the color information, so it is not as efficient at
compressing image files as .JPG.
PNG supports 8-bit indexed-color, 16-bit grayscale, and 24-bit true color images.
PNG supports transparency and interlacing but not animation.
Certain browsers do not support PNG format.

2

What is interlacing and progressive displays?
We can save images in an interlaced or progressive format.
A low resolution image is shown first, followed by one or more passes that refine the image until
the full-resolution image is displayed. This is known as interlacing.
Both interlacing and progressive display formats gradually display an image in a pre-specified
number of passes as the data arrives in the browser.
The only advantage to saving images in these formats is that the user will see a blurred image
that gradually clears, giving them something to look at as it downloads.
The biggest disadvantage to saving an image in this format is browser support. Older browsers
may not display the image properly.

3

Which image format is the best for the Web?
GIFs should be used for simple colored graphics and line art.
The .GIF format can also be used for animation and transparency.
The .JPG format is best for 24-bit full-color photographic images and complex graphics.
The .PNG format can be used instead of GIFs, but all browsers do not support this format. PNG
does not replace JPGs since PNGs do not compress 24-bit images as well as .JPG.

4

Computer Color Basics:
Color depth is the amount of data used to create color on a display.
Dithering occurs when a browser comes across a color it does not support. The browser then
attempts to mix its own colors to create a similar color.
Banding refers to the effort to match the closest colors from the GIFs palette to the original colors in
a photo.

5

Discuss the IMG element

The <IMG> markup element is used to place graphics or images on a Web page. The <IMG>
element is an empty element, so it does not require a closing tag. The <IMG> element only needs the
SRC attribute to display an image in a browser. There are other attributes that can be used to select
how and where the image appears in the browser.
Attribute
Use
ALIGN
Specifies the position of the image in relation to the surrounding text.
Displays an alternate string of text instead of an image if the user has a text-only
ALT
browser or has graphics turned off. The ALT value is displayed as a pop-up
window when a mouse points to the image.
Determines whether a border appears on the image. State the border value in
BORDER
pixels. We can use this attribute to turn off the hypertext border if the image is a
link.
HEIGHT
Specifies the height of the image in pixels.
Specifies the amount of horizontal white space on the left and right sides of the
HSPACE
image in pixels.
The only required attribute, SRC specifies the URL of the graphic file you want to
SRC
display. As with any URL, the path must be relative to the HTML file. Image
mukeshtekwani@hotmail.com
Page 2 of 4
HTML Graphics

VSPACE
WIDTH

filenames are case-sensitive!
Specifies the amount of vertical white space on the top and bottom sides of the
image in pixels.
Specifies the width of the image in pixels.

ALIGN, BORDER, VSPACE, and HSPACE have been deprecated in HTML 4.0 in favor of CSS.
The table below shows the replacement attributes:
Deprecated
Attribute
ALIGN

BORDER
HEIGHT
HSPACE and
VSPACE

6

Equivalent CSS Property
FLOAT allows you to flow text around an image or other object.
Example:
IMG {FLOAT: LEFT}
BORDER lets you set a border on an image, or remove the border from a
linked image.
Specifies the height of the image in pixels.
The PADDING or MARGIN properties set white space around an image.
You can control individual sides of the image, or apply white space
around the entire image.

Write a note on background images.
The BACKGROUND attribute is used to tile images across the background of a Web page.
Any image can be used as a background image, but design principles need to be kept in mind
when using images in the background.
Complex backgrounds can confuse and distract the user.
Dark or complex backgrounds should be avoided if a site contains a lot of text. Most text is
difficult to read against a background image unless the image is light enough to provide good
contrast for the text.
Instead of using a dark, busy image to tile a page background, instead choose a light, simple
image.
CSS allows more control over background image tiling that standard HTML. To apply a
background image with CSS, use the <BODY> element as the selector with the
BACKGROUND property (BODY {BACKGROUND: URL (texture4.jpg)}). Note the URL
syntax in the rule. The path and filename are contained within parentheses.
The default for CSS background graphics is the same as using the BACKGROUND attribute.
The image tiles across the page.
The CSS BACKGROUND-REPEAT property allows a designer to create a single column or row
of an image rather than tiling the image completely across the page. The BACKGROUNDPOSITION property can also be used to change the position of the background graphic.

7

What are transparent spacer GIFs?
We can set one color of a .GIF or .PNG to be transparent.
A single pixel graphic of one color set to be transparent can solve spacing problems that cannot
be solved with standard HTML code.
The WIDTH and HEIGHT attributes can be used to change the transparent spacer GIF to any
size desired.
The transparent spacer GIF is sometimes the only way to achieve a desired result.

8

How can we add white space around an image?
The designer should add white space around images to reduce clutter and improve readability.
To increase the white space around an image, the HSPACE and VSPACE attributes can be added

Prof. Mukesh N. Tekwani

Page 3 of 4
HTML Graphics
to the <IMG> element by specifying the pixel amount.
VSPACE affects both the top and bottom sides while HSPACE affects the left and right sides.
White space can also be added to a graphic by using graphic editing software.
CSS offers more control over image white space through the application of the margin properties
to individual sides of an image.

9

What is lossless file compression?
Lossless file compression is a technique (algorithm) that allows the exact original data to be
constructed from the compressed data.
This technique is used where it is important that the original and decomposed data must be
identical.
This technique is used in many applications e.g., in compressing application programs, in the ZIP
file utility, in compressing program files and text documents.
GIF and PNG image file formats use the lossless compression technique.
Huffman coding algorithm is used for lossless compression.
Lossless compression gives low compression ratios.

10 Explain Lossy Image Compression
Lossy image compression is a technique (algorithm) in which some data is lost when the image is
decompressed.
Lossy compression is used for multimedia files such as still images, audio and video, streaming
media and internet telephony.
The JPEG file format has lossy compression.
Lossy compression gives a very high compression ratio.
Lossy compression technique is necessary when large multimedia files have to be transferred
over a network; reducing the file size is important in this case.
A picture is converted to a digital file by considering it to be an array of dots, and specifying the
color and brightness of each dot. If the picture contains an area of the same color, it can be
compressed without loss by saying "200 red dots" instead of "red dot, red dot, ... red dot" 200
times.
Lossy compression works because in many cases files contain more information than is needed
for a particular purpose. For example, a picture may have more detail than the eye can distinguish
when reproduced.

Page 4 of 4

mukeshtekwani@hotmail.com

More Related Content

What's hot

CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Css
CssCss
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
Harshita Yadav
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
Lena Petsenchuk
 
Html
HtmlHtml
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
Brainware Consultancy Pvt Ltd
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
Image restoration
Image restorationImage restoration
Image restoration
Azad Singh
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
Jamshid Hashimi
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
Bootstrap
BootstrapBootstrap
Bootstrap
Jadson Santos
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
eShikshak
 
Css animation
Css animationCss animation
Css animation
Aaron King
 
Multimedia chapter 5
Multimedia chapter 5Multimedia chapter 5
Multimedia chapter 5
PrathimaBaliga
 
Digital Image File Formats
Digital Image File FormatsDigital Image File Formats
Digital Image File Formats
indiangarg
 
Character generation
Character generationCharacter generation
Character generation
Ankit Garg
 
HTTP
HTTPHTTP
HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
Nisa Soomro
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 

What's hot (20)

CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css
CssCss
Css
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Html
HtmlHtml
Html
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Image restoration
Image restorationImage restoration
Image restoration
 
New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Css animation
Css animationCss animation
Css animation
 
Multimedia chapter 5
Multimedia chapter 5Multimedia chapter 5
Multimedia chapter 5
 
Digital Image File Formats
Digital Image File FormatsDigital Image File Formats
Digital Image File Formats
 
Character generation
Character generationCharacter generation
Character generation
 
HTTP
HTTPHTTP
HTTP
 
HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 

Viewers also liked

Java chapter 5
Java chapter 5Java chapter 5
Java chapter 5
Mukesh Tekwani
 
Java 1-contd
Java 1-contdJava 1-contd
Java 1-contd
Mukesh Tekwani
 
Python - Regular Expressions
Python - Regular ExpressionsPython - Regular Expressions
Python - Regular Expressions
Mukesh Tekwani
 
Java chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsJava chapter 3 - OOPs concepts
Java chapter 3 - OOPs concepts
Mukesh Tekwani
 
Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and use
Mukesh Tekwani
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
Mukesh Tekwani
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
Mukesh Tekwani
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQ
Mukesh Tekwani
 
Phases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingPhases of the Compiler - Systems Programming
Phases of the Compiler - Systems Programming
Mukesh Tekwani
 
Jdbc 1
Jdbc 1Jdbc 1
Data Link Layer
Data Link Layer Data Link Layer
Data Link Layer
Mukesh Tekwani
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing files
Mukesh Tekwani
 
Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
Mukesh Tekwani
 
Java misc1
Java misc1Java misc1
Java misc1
Mukesh Tekwani
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
Mukesh Tekwani
 
Data communications ch 1
Data communications   ch 1Data communications   ch 1
Data communications ch 1
Mukesh Tekwani
 
Chap 3 data and signals
Chap 3 data and signalsChap 3 data and signals
Chap 3 data and signals
Mukesh Tekwani
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Wayne Jones Jnr
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
Mukesh Tekwani
 

Viewers also liked (19)

Java chapter 5
Java chapter 5Java chapter 5
Java chapter 5
 
Java 1-contd
Java 1-contdJava 1-contd
Java 1-contd
 
Python - Regular Expressions
Python - Regular ExpressionsPython - Regular Expressions
Python - Regular Expressions
 
Java chapter 3 - OOPs concepts
Java chapter 3 - OOPs conceptsJava chapter 3 - OOPs concepts
Java chapter 3 - OOPs concepts
 
Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and use
 
Java swing 1
Java swing 1Java swing 1
Java swing 1
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQ
 
Phases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingPhases of the Compiler - Systems Programming
Phases of the Compiler - Systems Programming
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
Data Link Layer
Data Link Layer Data Link Layer
Data Link Layer
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing files
 
Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
Java misc1
Java misc1Java misc1
Java misc1
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Data communications ch 1
Data communications   ch 1Data communications   ch 1
Data communications ch 1
 
Chap 3 data and signals
Chap 3 data and signalsChap 3 data and signals
Chap 3 data and signals
 
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File TransferChapter 26 - Remote Logging, Electronic Mail & File Transfer
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 

Similar to Html graphics

Inserting imagesin html
Inserting imagesin htmlInserting imagesin html
Inserting imagesin html
nobel mujuji
 
Animation in the web
Animation in the webAnimation in the web
Animation in the web
Vishal Polley
 
Webquest
WebquestWebquest
Webquest
webquest
 
JPG vs. GIF vs. PNG
JPG vs. GIF vs. PNGJPG vs. GIF vs. PNG
JPG vs. GIF vs. PNG
kay2
 
Week 6 Task File Formats
Week 6 Task   File FormatsWeek 6 Task   File Formats
Week 6 Task File Formats
guest2cf876
 
All About Graphics
All About GraphicsAll About Graphics
All About Graphics
megweb
 
Power Point Presentation
Power Point PresentationPower Point Presentation
Power Point Presentation
CharlCooper
 
File types
File typesFile types
File types
Kate Carlyle
 
About graphics-on-web
About graphics-on-webAbout graphics-on-web
About graphics-on-web
Tayyab Ahmed
 
Chap16
Chap16Chap16
Chap16
dkd_woohoo
 
File Formats Re-Submission
File Formats Re-SubmissionFile Formats Re-Submission
File Formats Re-Submission
tomwaumsley
 
Graphic File Formats
Graphic File FormatsGraphic File Formats
Graphic File Formats
bs07sjh
 
Graphics
GraphicsGraphics
Bmsc1103
Bmsc1103Bmsc1103
Bmsc1103
cool_beans
 
BMSC1103 presentation
BMSC1103 presentationBMSC1103 presentation
BMSC1103 presentation
gueste8bf88
 
Graphic File Formats
Graphic  File  FormatsGraphic  File  Formats
Graphic File Formats
aidanbd
 
Image & Graphic Files
Image & Graphic FilesImage & Graphic Files
Image & Graphic Files
bs07d3p
 
File Types Pro Forma
File Types Pro FormaFile Types Pro Forma
File Types Pro Forma
Emily-F
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
Steve Guinan
 
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation  Websites Session 7 by Muhammad Ehtisham SiddiquiBuilding Next Generation  Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Muhammad Ehtisham Siddiqui
 

Similar to Html graphics (20)

Inserting imagesin html
Inserting imagesin htmlInserting imagesin html
Inserting imagesin html
 
Animation in the web
Animation in the webAnimation in the web
Animation in the web
 
Webquest
WebquestWebquest
Webquest
 
JPG vs. GIF vs. PNG
JPG vs. GIF vs. PNGJPG vs. GIF vs. PNG
JPG vs. GIF vs. PNG
 
Week 6 Task File Formats
Week 6 Task   File FormatsWeek 6 Task   File Formats
Week 6 Task File Formats
 
All About Graphics
All About GraphicsAll About Graphics
All About Graphics
 
Power Point Presentation
Power Point PresentationPower Point Presentation
Power Point Presentation
 
File types
File typesFile types
File types
 
About graphics-on-web
About graphics-on-webAbout graphics-on-web
About graphics-on-web
 
Chap16
Chap16Chap16
Chap16
 
File Formats Re-Submission
File Formats Re-SubmissionFile Formats Re-Submission
File Formats Re-Submission
 
Graphic File Formats
Graphic File FormatsGraphic File Formats
Graphic File Formats
 
Graphics
GraphicsGraphics
Graphics
 
Bmsc1103
Bmsc1103Bmsc1103
Bmsc1103
 
BMSC1103 presentation
BMSC1103 presentationBMSC1103 presentation
BMSC1103 presentation
 
Graphic File Formats
Graphic  File  FormatsGraphic  File  Formats
Graphic File Formats
 
Image & Graphic Files
Image & Graphic FilesImage & Graphic Files
Image & Graphic Files
 
File Types Pro Forma
File Types Pro FormaFile Types Pro Forma
File Types Pro Forma
 
Chapter 23: Web Images
Chapter 23: Web ImagesChapter 23: Web Images
Chapter 23: Web Images
 
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation  Websites Session 7 by Muhammad Ehtisham SiddiquiBuilding Next Generation  Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
 

More from Mukesh Tekwani

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube Channel
Mukesh Tekwani
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdf
Mukesh Tekwani
 
Circular motion
Circular motionCircular motion
Circular motion
Mukesh Tekwani
 
Gravitation
GravitationGravitation
Gravitation
Mukesh Tekwani
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
Mukesh Tekwani
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
Mukesh Tekwani
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
Mukesh Tekwani
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
Mukesh Tekwani
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
Mukesh Tekwani
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
Mukesh Tekwani
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
Mukesh Tekwani
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
Mukesh Tekwani
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
Mukesh Tekwani
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
Mukesh Tekwani
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
Mukesh Tekwani
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
Mukesh Tekwani
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
Mukesh Tekwani
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
Mukesh Tekwani
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
Mukesh Tekwani
 
XML
XMLXML

More from Mukesh Tekwani (20)

Computer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube ChannelComputer Science Made Easy - Youtube Channel
Computer Science Made Easy - Youtube Channel
 
The Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdfThe Elphinstonian 1988-College Building Centenary Number (2).pdf
The Elphinstonian 1988-College Building Centenary Number (2).pdf
 
Circular motion
Circular motionCircular motion
Circular motion
 
Gravitation
GravitationGravitation
Gravitation
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
XML
XMLXML
XML
 

Recently uploaded

Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 

Recently uploaded (20)

Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 

Html graphics

  • 1. HTML Graphics HTML Graphics 1 What are the commonly used image file formats on the Web? Describe them. The three most widely accepted image file formats on the Web are: .GIF, .JPG, and .PNG. All of the formats compress the images to create smaller files that download much more quickly than the original image. GIF - Graphics Interchange Format GIF uses a compression technique that preserves all of the color information for the image. The .GIF format has an 8-bit color depth that allows for the use of 256 colors (as 28 = 256). The fewer the number of colors that are used in a .GIF file, the greater the compression and the smaller the file size. The .GIF file is ideal for line art and color graphics because it is excellent at compressing and displaying flat color areas. It uses a simple compression algorithm. Because of the color depth limitation, however, the .GIF format is limiting and should not be used for photographs or complex graphics that have gradation in colour. GIF Transparency: With GIF files we can choose one color in an image to appear as transparent in the browser The background color or pattern will show through the areas that we marks as transparent. Using transparent areas allows us to create graphics that appear to have an irregular shape instead of a rectangle. GIF Animation The .GIF format allows a designer to store multiple images and timing information about the images in a single file. This allows the creation of animations consisting of multiple static images that rotate, creating the illusion of motion. When creating a GIF animation, a designer can adjust the amount of time between frames and the number of times that the animation plays. GIF animation does not require browser plug-ins and does not have large download times. Some of the tools through which we can create GIF animation are: ULead GIF Animator, and Microsoft Liquid Motion. Disadvantages of animated GIF images: They only support 256 color palette. They can only animate in browsers that support animated gifs. They cannot be edited once they are encoded as an animated gif. If we edit animated GIF, we will lose the animation sequence when it is saved. JPG - Joint Photographic Experts Group (JPG or JPEG) image file format. JPGs support millions of colors since they are 24-bit, so they are ideal for photographs or continuous tone images. JPGs use a lossy file compression technique that discards some colors, so there may be a loss of quality from the original image. The compression algorithm is more complex for JPG files. When saving an image in .JPG format, a slider lets the designer choose the quality of the image. The higher the compression, the smaller the size of the image file and the quicker the download time, but the lower the image quality. Images can be converted into JPG format using tools such as Adobe PhotoShop. This format is not suitable for images with text and large blocks of solid color, and simple shapes with crisp edges. This is because when the image is compressed the text, color or lines may blur resulting in image that is not as sharp. Prof. Mukesh N. Tekwani Page 1 of 4
  • 2. HTML Graphics PNG - Portable Network Graphics format This was specifically designed for use on the Web. It has better compression rates than GIF images and therefore images are smaller in size. It uses a compression technique that retains all of the color information, so it is not as efficient at compressing image files as .JPG. PNG supports 8-bit indexed-color, 16-bit grayscale, and 24-bit true color images. PNG supports transparency and interlacing but not animation. Certain browsers do not support PNG format. 2 What is interlacing and progressive displays? We can save images in an interlaced or progressive format. A low resolution image is shown first, followed by one or more passes that refine the image until the full-resolution image is displayed. This is known as interlacing. Both interlacing and progressive display formats gradually display an image in a pre-specified number of passes as the data arrives in the browser. The only advantage to saving images in these formats is that the user will see a blurred image that gradually clears, giving them something to look at as it downloads. The biggest disadvantage to saving an image in this format is browser support. Older browsers may not display the image properly. 3 Which image format is the best for the Web? GIFs should be used for simple colored graphics and line art. The .GIF format can also be used for animation and transparency. The .JPG format is best for 24-bit full-color photographic images and complex graphics. The .PNG format can be used instead of GIFs, but all browsers do not support this format. PNG does not replace JPGs since PNGs do not compress 24-bit images as well as .JPG. 4 Computer Color Basics: Color depth is the amount of data used to create color on a display. Dithering occurs when a browser comes across a color it does not support. The browser then attempts to mix its own colors to create a similar color. Banding refers to the effort to match the closest colors from the GIFs palette to the original colors in a photo. 5 Discuss the IMG element The <IMG> markup element is used to place graphics or images on a Web page. The <IMG> element is an empty element, so it does not require a closing tag. The <IMG> element only needs the SRC attribute to display an image in a browser. There are other attributes that can be used to select how and where the image appears in the browser. Attribute Use ALIGN Specifies the position of the image in relation to the surrounding text. Displays an alternate string of text instead of an image if the user has a text-only ALT browser or has graphics turned off. The ALT value is displayed as a pop-up window when a mouse points to the image. Determines whether a border appears on the image. State the border value in BORDER pixels. We can use this attribute to turn off the hypertext border if the image is a link. HEIGHT Specifies the height of the image in pixels. Specifies the amount of horizontal white space on the left and right sides of the HSPACE image in pixels. The only required attribute, SRC specifies the URL of the graphic file you want to SRC display. As with any URL, the path must be relative to the HTML file. Image mukeshtekwani@hotmail.com Page 2 of 4
  • 3. HTML Graphics VSPACE WIDTH filenames are case-sensitive! Specifies the amount of vertical white space on the top and bottom sides of the image in pixels. Specifies the width of the image in pixels. ALIGN, BORDER, VSPACE, and HSPACE have been deprecated in HTML 4.0 in favor of CSS. The table below shows the replacement attributes: Deprecated Attribute ALIGN BORDER HEIGHT HSPACE and VSPACE 6 Equivalent CSS Property FLOAT allows you to flow text around an image or other object. Example: IMG {FLOAT: LEFT} BORDER lets you set a border on an image, or remove the border from a linked image. Specifies the height of the image in pixels. The PADDING or MARGIN properties set white space around an image. You can control individual sides of the image, or apply white space around the entire image. Write a note on background images. The BACKGROUND attribute is used to tile images across the background of a Web page. Any image can be used as a background image, but design principles need to be kept in mind when using images in the background. Complex backgrounds can confuse and distract the user. Dark or complex backgrounds should be avoided if a site contains a lot of text. Most text is difficult to read against a background image unless the image is light enough to provide good contrast for the text. Instead of using a dark, busy image to tile a page background, instead choose a light, simple image. CSS allows more control over background image tiling that standard HTML. To apply a background image with CSS, use the <BODY> element as the selector with the BACKGROUND property (BODY {BACKGROUND: URL (texture4.jpg)}). Note the URL syntax in the rule. The path and filename are contained within parentheses. The default for CSS background graphics is the same as using the BACKGROUND attribute. The image tiles across the page. The CSS BACKGROUND-REPEAT property allows a designer to create a single column or row of an image rather than tiling the image completely across the page. The BACKGROUNDPOSITION property can also be used to change the position of the background graphic. 7 What are transparent spacer GIFs? We can set one color of a .GIF or .PNG to be transparent. A single pixel graphic of one color set to be transparent can solve spacing problems that cannot be solved with standard HTML code. The WIDTH and HEIGHT attributes can be used to change the transparent spacer GIF to any size desired. The transparent spacer GIF is sometimes the only way to achieve a desired result. 8 How can we add white space around an image? The designer should add white space around images to reduce clutter and improve readability. To increase the white space around an image, the HSPACE and VSPACE attributes can be added Prof. Mukesh N. Tekwani Page 3 of 4
  • 4. HTML Graphics to the <IMG> element by specifying the pixel amount. VSPACE affects both the top and bottom sides while HSPACE affects the left and right sides. White space can also be added to a graphic by using graphic editing software. CSS offers more control over image white space through the application of the margin properties to individual sides of an image. 9 What is lossless file compression? Lossless file compression is a technique (algorithm) that allows the exact original data to be constructed from the compressed data. This technique is used where it is important that the original and decomposed data must be identical. This technique is used in many applications e.g., in compressing application programs, in the ZIP file utility, in compressing program files and text documents. GIF and PNG image file formats use the lossless compression technique. Huffman coding algorithm is used for lossless compression. Lossless compression gives low compression ratios. 10 Explain Lossy Image Compression Lossy image compression is a technique (algorithm) in which some data is lost when the image is decompressed. Lossy compression is used for multimedia files such as still images, audio and video, streaming media and internet telephony. The JPEG file format has lossy compression. Lossy compression gives a very high compression ratio. Lossy compression technique is necessary when large multimedia files have to be transferred over a network; reducing the file size is important in this case. A picture is converted to a digital file by considering it to be an array of dots, and specifying the color and brightness of each dot. If the picture contains an area of the same color, it can be compressed without loss by saying "200 red dots" instead of "red dot, red dot, ... red dot" 200 times. Lossy compression works because in many cases files contain more information than is needed for a particular purpose. For example, a picture may have more detail than the eye can distinguish when reproduced. Page 4 of 4 mukeshtekwani@hotmail.com