SlideShare a Scribd company logo
HTML Images and HTML
Backgrounds
Presented by Nobel Mujuji
(BSc Hons Information Systems )(WUA)
Images and HTML Backgrounds
• Web pages with text alone can be boring, and to prevent this, it is always
good to used images and backgrounds to bring life to the web page. Images
and backgrounds can be used as design elements in the web page to make
it look better and more interesting. In this section you will learn the final
basics of HTML.
• in your HTML document. This part is broken down into two sections:
• Images Learn how to add Images to your page and display it on your web
page.
• Backgrounds Learn how to add Background elements on the page and
further design your web page.
• Images can be added to a web page very easily using the <img> tag.
The <img> tag should be specified a source for the image, using the
src attribute (src= path_to_image). Like for a hyperlink, the value for
src can either be a relative reference or a direct reference including an
URL address.
• For example:
• <img src="http://www.aspnetbook.com/images/aspnetbook.png"/>
html - source urls
• Image source URLs can be either local or global, meaning that the picture
files you wish to display on your website can be either hosted locally on
your machine (local) or hosted elsewhere on some other web site domain
(global).
Global: http://www.tizag.com/pics/htmlT/sunset.gif
Local: pics/sunset.gif
• Local URLs are relative to the file path of the web page itself. For example,
if the picture file is placed inside the same directory as the web page, then
the local URL for the image would simply be the name of the image, since it
is residing in the same directory as the HTML page.
Here's What's Happening: the Image Element
Parameters
IMG stands for "image." It announces to the browser that an image will go here on
the page. Yes, the image will pop up right where you write in the image tag.
SRC stands for "source." This again is an attribute, a command inside a command.
It's telling the browser where to go to find the image. Again, it's best for you to
place the images you want to use in a subdirectory called "images". This way you
can call for the image by name with just the subdir name in front of it, like this:
/images/imagename.gif. You could also direct the source to some other place
online, such as an image you have stored on Photobucket, for instance, by using the
full URL of the image, such as
http://www.photobucket.com/youraccount/imagename.jpg. Right now, let's just
get it to work.
image.gif is the name of the image. Notice it's following the same type of
format as your HTML documents. There is a name (image) then a dot and
then there is a suffix (gif).
ALT stands for "alternate text". This tells the browser that if it can't find the
image, then just display this text. It also tells anyone who can't view your
image what the image is about. For example a disabled user using a screen
reader, or dare I mention it, Search Engines. When you mouse over the
image, the alternate text pops up.
"some text" is where you put the text describing your image
HEIGHT stands for, as you might guess, the height of the image in
pixels. Again, the height can be just about anything, but generally will
be less than the height of the web browser.
.gif This is pronounced "jif" or "gif" (hard "G") depending on whom you
speak to. I have always said "jif", like the peanut butter. This is an
acronym for Graphics Interchange Format.
.png Pronounced as 'ping', this stands for Portable Network Graphic.
This is ultimately the replacement for .gif, with partial transparency
options, but browser support is sketchy--some browsers still don't like
to display .png files.
.jpeg or .jpg (pronounced "j-peg") There are two names to denote this
format because of the PC and MAC formats allowing 3 and 4 letters
after the dot. JPEG is an acronym for Joint Photographic Experts Group,
the organization that invented the format.
The format is unique in that it uses compression after it's been created.
That's fancy computer talk that means that when the computer is not
using a .jpeg image it folds it up and puts it away.
.bmp (pronounced "bimp") This is a "bitmap." You will probably never
place a bitmap as an image, although some browsers do allow it. A
bitmap is an image that a computer produces and places for you. A
counter is an example. Even though some browers, such as Internet
Explorer, will allow you to place a BMP as an image, I wouldn't. Most
browsers will not be able to display it. Go with .gif, .jpg or .png
Adding Images!
• The HTML code for adding the image is a simple one liner; the <IMG>
command. There are over a dozen attributes or options which may be
added to this command, but to keep things simple I'll only go over a
couple. Suppose we want to add an image named "image.gif" to our
page.
<img src="image.gif" alt="" border="1">
The WIDTH and HEIGHT Attributes:
You can also specify the image's WIDTH and HEIGHT. If the width
and/or height are not the actual image dimensions then the image will
be scaled to fit. For example, let us take our masterpiece and stretch it
across the screen a little.
• <img src="image.gif" width="500" height="50" alt="">
The ALT Attribute:
An attribute that you might not think does much is the ALT option.
Believe it or not, there is a small percentage of web surfers who can not
view images. By adding the ALT attribute you will be able to describe in
text what they are missing. It's courtesy for people who's browser does
not support images. Most browsers also display this information while
the image is loading. Here's what the above example code would look
like with an ALT attribute.
The WIDTH and HEIGHT Attributes
You can also specify the image's WIDTH and HEIGHT. If the width
and/or height are not the actual image dimensions then the image will
be scaled to fit. For example, let us take our masterpiece and stretch it
across the screen a little.
<img src="image.gif" width="500" height="50" alt="">
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds
Html images and html backgrounds

More Related Content

What's hot

Html & CSS
Html & CSSHtml & CSS
Html & CSS
JainilSampat
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
Swati Sharma
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
JayjZens
 
Understanding THML
Understanding THMLUnderstanding THML
Understanding THML
Hinopak Motors Limited
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
eShikshak
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
Michael Jhon
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
palhaftab
 
presentation in html,css,javascript
presentation in html,css,javascriptpresentation in html,css,javascript
presentation in html,css,javascript
FaysalAhammed5
 
html-css
html-csshtml-css
CSS notes
CSS notesCSS notes
CSS notes
Rajendra Prasad
 
Html Study Guide
Html Study GuideHtml Study Guide
Html Study Guide
vergetec
 
Difference between-web-designing-and-web-development
Difference between-web-designing-and-web-developmentDifference between-web-designing-and-web-development
Difference between-web-designing-and-web-development
Global Media Insight
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answers
MohitKumar1985
 
Hushang Gaikwad
Hushang GaikwadHushang Gaikwad
Hushang Gaikwad
Hushnag Gaikwad
 
CSS
CSS CSS
CSS
Sunil OS
 
Web Page Designing
Web Page DesigningWeb Page Designing
Web Page Designing
Amit Mali
 
Html training slide
Html training slideHtml training slide
Html training slide
villupuramtraining
 
Intro Html
Intro HtmlIntro Html
Intro Html
Chidanand Byahatti
 

What's hot (20)

Html & CSS
Html & CSSHtml & CSS
Html & CSS
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Html and css
Html and cssHtml and css
Html and css
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 
Understanding THML
Understanding THMLUnderstanding THML
Understanding THML
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
 
presentation in html,css,javascript
presentation in html,css,javascriptpresentation in html,css,javascript
presentation in html,css,javascript
 
html-css
html-csshtml-css
html-css
 
CSS notes
CSS notesCSS notes
CSS notes
 
Css
CssCss
Css
 
Html Study Guide
Html Study GuideHtml Study Guide
Html Study Guide
 
Difference between-web-designing-and-web-development
Difference between-web-designing-and-web-developmentDifference between-web-designing-and-web-development
Difference between-web-designing-and-web-development
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answers
 
Hushang Gaikwad
Hushang GaikwadHushang Gaikwad
Hushang Gaikwad
 
CSS
CSS CSS
CSS
 
Web Page Designing
Web Page DesigningWeb Page Designing
Web Page Designing
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Intro Html
Intro HtmlIntro Html
Intro Html
 

Viewers also liked

List and images in html
List and images in htmlList and images in html
List and images in html
prithvisawla
 
Images and Lists in HTML
Images and Lists in HTMLImages and Lists in HTML
Images and Lists in HTML
Marlon Jamera
 
Html hyperlinks
Html hyperlinksHtml hyperlinks
Html hyperlinks
nobel mujuji
 
Working with HTML Lists
Working with HTML ListsWorking with HTML Lists
Working with HTML Lists
Ray Villalobos
 
HTML Link - Image - Comments
HTML  Link - Image - CommentsHTML  Link - Image - Comments
HTML Link - Image - Comments
Hameda Hurmat
 
Hyperlinks in HTML
Hyperlinks in HTMLHyperlinks in HTML
Hyperlinks in HTMLAarti P
 
Anchor tag HTML Presentation
Anchor tag HTML PresentationAnchor tag HTML Presentation
Anchor tag HTML Presentation
Nimish Gupta
 
WordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping ToolWordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping Tool
Amit Kumar Singh
 
Верстка_Лекция1
Верстка_Лекция1Верстка_Лекция1
Верстка_Лекция1itc73
 
Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)
Zoe Gillenwater
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требованийISsoft
 
Getting Started With Php Frameworks @BCP5
Getting Started With Php Frameworks @BCP5Getting Started With Php Frameworks @BCP5
Getting Started With Php Frameworks @BCP5
Amit Kumar Singh
 
Custom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.xCustom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.x
Amit Kumar Singh
 
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Yandex
 
решение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baрешение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baISsoft
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеISsoft
 

Viewers also liked (20)

List and images in html
List and images in htmlList and images in html
List and images in html
 
Images and Lists in HTML
Images and Lists in HTMLImages and Lists in HTML
Images and Lists in HTML
 
HTML
HTMLHTML
HTML
 
Html hyperlinks
Html hyperlinksHtml hyperlinks
Html hyperlinks
 
Links - IntraPage
Links - IntraPageLinks - IntraPage
Links - IntraPage
 
Html links
Html linksHtml links
Html links
 
Working with HTML Lists
Working with HTML ListsWorking with HTML Lists
Working with HTML Lists
 
HTML Link - Image - Comments
HTML  Link - Image - CommentsHTML  Link - Image - Comments
HTML Link - Image - Comments
 
Hyperlinks in HTML
Hyperlinks in HTMLHyperlinks in HTML
Hyperlinks in HTML
 
LINKING IN HTML
LINKING IN HTMLLINKING IN HTML
LINKING IN HTML
 
Anchor tag HTML Presentation
Anchor tag HTML PresentationAnchor tag HTML Presentation
Anchor tag HTML Presentation
 
WordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping ToolWordPress as Rapid Prototyping Tool
WordPress as Rapid Prototyping Tool
 
Верстка_Лекция1
Верстка_Лекция1Верстка_Лекция1
Верстка_Лекция1
 
Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)Using Flexbox Today (Generate Sydney 2016)
Using Flexbox Today (Generate Sydney 2016)
 
Тестирование требований
Тестирование требованийТестирование требований
Тестирование требований
 
Getting Started With Php Frameworks @BCP5
Getting Started With Php Frameworks @BCP5Getting Started With Php Frameworks @BCP5
Getting Started With Php Frameworks @BCP5
 
Custom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.xCustom Post Type and Taxonomies in WordPress 3.x
Custom Post Type and Taxonomies in WordPress 3.x
 
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
Сергей Бережной "Про шаблонизаторы вообще и BEMHTML в частности"
 
решение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте baрешение основной проблемы Agile (scrum) проектов в контексте ba
решение основной проблемы Agile (scrum) проектов в контексте ba
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проекте
 

Similar to Html images and html backgrounds

HTML Images
HTML Images HTML Images
HTML Images
Nisa Soomro
 
Html 5 and CSS - Image Element
Html 5 and CSS - Image ElementHtml 5 and CSS - Image Element
Html 5 and CSS - Image Element
Kempy7000
 
Images
ImagesImages
Animation in the web
Animation in the webAnimation in the web
Animation in the web
Vishal Polley
 
Designing web page marquee and img tag
Designing web page  marquee and img tagDesigning web page  marquee and img tag
Designing web page marquee and img tag
Jesus Obenita Jr.
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Nuzhat Memon
 
Presentation
PresentationPresentation
Presentation
Bbhulme1
 
2.1 adding images
2.1 adding images2.1 adding images
2.1 adding imagesBulldogs83
 
BASIC HTML
BASIC HTMLBASIC HTML
BASIC HTML
EverromeAsico2
 
Adding graphics to your web page
Adding graphics to your web pageAdding graphics to your web page
Adding graphics to your web pagecachs_computing
 
TopicHero Descriptions Tutorial
TopicHero Descriptions TutorialTopicHero Descriptions Tutorial
TopicHero Descriptions Tutorial
Justin Coven, Ph.D.
 
HTML in Omeka
HTML in OmekaHTML in Omeka
HTML in Omeka
Dan Royles
 
Inserting imagesin html
Inserting imagesin htmlInserting imagesin html
Inserting imagesin html
nobel mujuji
 
Seo for image
Seo for imageSeo for image
Seo for image
NupurSamaddar2
 
CAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptxCAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptx
vahidullahahmed
 
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
 
Image optimization: why and how
Image optimization: why and howImage optimization: why and how
Image optimization: why and how
Amit Ranjan
 
HTML Attributes.pptx
HTML Attributes.pptxHTML Attributes.pptx
HTML Attributes.pptx
Steins18
 
Html 5
Html   5Html   5

Similar to Html images and html backgrounds (20)

HTML Images
HTML Images HTML Images
HTML Images
 
Html 5 and CSS - Image Element
Html 5 and CSS - Image ElementHtml 5 and CSS - Image Element
Html 5 and CSS - Image Element
 
Images
ImagesImages
Images
 
Animation in the web
Animation in the webAnimation in the web
Animation in the web
 
Designing web page marquee and img tag
Designing web page  marquee and img tagDesigning web page  marquee and img tag
Designing web page marquee and img tag
 
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
Std 10 Computer Chapter 3 Handling Images in HTML (Part 1)
 
Presentation
PresentationPresentation
Presentation
 
Session no 4
Session no 4Session no 4
Session no 4
 
2.1 adding images
2.1 adding images2.1 adding images
2.1 adding images
 
BASIC HTML
BASIC HTMLBASIC HTML
BASIC HTML
 
Adding graphics to your web page
Adding graphics to your web pageAdding graphics to your web page
Adding graphics to your web page
 
TopicHero Descriptions Tutorial
TopicHero Descriptions TutorialTopicHero Descriptions Tutorial
TopicHero Descriptions Tutorial
 
HTML in Omeka
HTML in OmekaHTML in Omeka
HTML in Omeka
 
Inserting imagesin html
Inserting imagesin htmlInserting imagesin html
Inserting imagesin html
 
Seo for image
Seo for imageSeo for image
Seo for image
 
CAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptxCAP 756 UNIT 1.pptx
CAP 756 UNIT 1.pptx
 
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
 
Image optimization: why and how
Image optimization: why and howImage optimization: why and how
Image optimization: why and how
 
HTML Attributes.pptx
HTML Attributes.pptxHTML Attributes.pptx
HTML Attributes.pptx
 
Html 5
Html   5Html   5
Html 5
 

More from nobel mujuji

Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
nobel mujuji
 
Positioning text
Positioning textPositioning text
Positioning text
nobel mujuji
 
Html frames
Html framesHtml frames
Html frames
nobel mujuji
 
Html forms
Html formsHtml forms
Html forms
nobel mujuji
 
Html character entities
Html character entitiesHtml character entities
Html character entities
nobel mujuji
 
Horizontal lines!
Horizontal lines!Horizontal lines!
Horizontal lines!
nobel mujuji
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
nobel mujuji
 
Creating lists
Creating listsCreating lists
Creating lists
nobel mujuji
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
nobel mujuji
 
Chapter 1 one html
Chapter 1 one htmlChapter 1 one html
Chapter 1 one html
nobel mujuji
 
Chapter 1 html
Chapter 1 htmlChapter 1 html
Chapter 1 html
nobel mujuji
 
Adding text in html
Adding text in htmlAdding text in html
Adding text in html
nobel mujuji
 
Javascript conditional statements
Javascript conditional statementsJavascript conditional statements
Javascript conditional statements
nobel mujuji
 

More from nobel mujuji (13)

Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
Positioning text
Positioning textPositioning text
Positioning text
 
Html frames
Html framesHtml frames
Html frames
 
Html forms
Html formsHtml forms
Html forms
 
Html character entities
Html character entitiesHtml character entities
Html character entities
 
Horizontal lines!
Horizontal lines!Horizontal lines!
Horizontal lines!
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Creating lists
Creating listsCreating lists
Creating lists
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Chapter 1 one html
Chapter 1 one htmlChapter 1 one html
Chapter 1 one html
 
Chapter 1 html
Chapter 1 htmlChapter 1 html
Chapter 1 html
 
Adding text in html
Adding text in htmlAdding text in html
Adding text in html
 
Javascript conditional statements
Javascript conditional statementsJavascript conditional statements
Javascript conditional statements
 

Recently uploaded

Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
aaryangarg12
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
ameli25062005
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
Alan Dix
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
h7j5io0
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
Mansi Shah
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
ameli25062005
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
TeeFusion
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
7sd8fier
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
madhavlakhanpal29
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Mansi Shah
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
h7j5io0
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
h7j5io0
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
708pb191
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
PlanitIsrael
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
ResDraft
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
n0tivyq
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
fabianavillanib
 

Recently uploaded (20)

Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
 
Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 

Html images and html backgrounds

  • 1. HTML Images and HTML Backgrounds Presented by Nobel Mujuji (BSc Hons Information Systems )(WUA)
  • 2. Images and HTML Backgrounds • Web pages with text alone can be boring, and to prevent this, it is always good to used images and backgrounds to bring life to the web page. Images and backgrounds can be used as design elements in the web page to make it look better and more interesting. In this section you will learn the final basics of HTML. • in your HTML document. This part is broken down into two sections: • Images Learn how to add Images to your page and display it on your web page. • Backgrounds Learn how to add Background elements on the page and further design your web page.
  • 3. • Images can be added to a web page very easily using the <img> tag. The <img> tag should be specified a source for the image, using the src attribute (src= path_to_image). Like for a hyperlink, the value for src can either be a relative reference or a direct reference including an URL address. • For example: • <img src="http://www.aspnetbook.com/images/aspnetbook.png"/>
  • 4. html - source urls • Image source URLs can be either local or global, meaning that the picture files you wish to display on your website can be either hosted locally on your machine (local) or hosted elsewhere on some other web site domain (global). Global: http://www.tizag.com/pics/htmlT/sunset.gif Local: pics/sunset.gif • Local URLs are relative to the file path of the web page itself. For example, if the picture file is placed inside the same directory as the web page, then the local URL for the image would simply be the name of the image, since it is residing in the same directory as the HTML page.
  • 5. Here's What's Happening: the Image Element Parameters IMG stands for "image." It announces to the browser that an image will go here on the page. Yes, the image will pop up right where you write in the image tag. SRC stands for "source." This again is an attribute, a command inside a command. It's telling the browser where to go to find the image. Again, it's best for you to place the images you want to use in a subdirectory called "images". This way you can call for the image by name with just the subdir name in front of it, like this: /images/imagename.gif. You could also direct the source to some other place online, such as an image you have stored on Photobucket, for instance, by using the full URL of the image, such as http://www.photobucket.com/youraccount/imagename.jpg. Right now, let's just get it to work.
  • 6. image.gif is the name of the image. Notice it's following the same type of format as your HTML documents. There is a name (image) then a dot and then there is a suffix (gif). ALT stands for "alternate text". This tells the browser that if it can't find the image, then just display this text. It also tells anyone who can't view your image what the image is about. For example a disabled user using a screen reader, or dare I mention it, Search Engines. When you mouse over the image, the alternate text pops up. "some text" is where you put the text describing your image
  • 7. HEIGHT stands for, as you might guess, the height of the image in pixels. Again, the height can be just about anything, but generally will be less than the height of the web browser. .gif This is pronounced "jif" or "gif" (hard "G") depending on whom you speak to. I have always said "jif", like the peanut butter. This is an acronym for Graphics Interchange Format. .png Pronounced as 'ping', this stands for Portable Network Graphic. This is ultimately the replacement for .gif, with partial transparency options, but browser support is sketchy--some browsers still don't like to display .png files.
  • 8. .jpeg or .jpg (pronounced "j-peg") There are two names to denote this format because of the PC and MAC formats allowing 3 and 4 letters after the dot. JPEG is an acronym for Joint Photographic Experts Group, the organization that invented the format. The format is unique in that it uses compression after it's been created. That's fancy computer talk that means that when the computer is not using a .jpeg image it folds it up and puts it away. .bmp (pronounced "bimp") This is a "bitmap." You will probably never place a bitmap as an image, although some browsers do allow it. A bitmap is an image that a computer produces and places for you. A counter is an example. Even though some browers, such as Internet Explorer, will allow you to place a BMP as an image, I wouldn't. Most browsers will not be able to display it. Go with .gif, .jpg or .png
  • 9. Adding Images! • The HTML code for adding the image is a simple one liner; the <IMG> command. There are over a dozen attributes or options which may be added to this command, but to keep things simple I'll only go over a couple. Suppose we want to add an image named "image.gif" to our page. <img src="image.gif" alt="" border="1">
  • 10. The WIDTH and HEIGHT Attributes: You can also specify the image's WIDTH and HEIGHT. If the width and/or height are not the actual image dimensions then the image will be scaled to fit. For example, let us take our masterpiece and stretch it across the screen a little. • <img src="image.gif" width="500" height="50" alt="">
  • 11. The ALT Attribute: An attribute that you might not think does much is the ALT option. Believe it or not, there is a small percentage of web surfers who can not view images. By adding the ALT attribute you will be able to describe in text what they are missing. It's courtesy for people who's browser does not support images. Most browsers also display this information while the image is loading. Here's what the above example code would look like with an ALT attribute.
  • 12. The WIDTH and HEIGHT Attributes You can also specify the image's WIDTH and HEIGHT. If the width and/or height are not the actual image dimensions then the image will be scaled to fit. For example, let us take our masterpiece and stretch it across the screen a little. <img src="image.gif" width="500" height="50" alt="">