SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Copyright © Terry Felke-Morris
WEB DEVELOPMENT & DESIGN
FOUNDATIONS WITH HTML5
Chapter 4
Key Concepts
1Copyright © Terry Felke-Morris
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
HORIZONTAL RULE ELEMENT
!Configures a horizontal line
!XHTML Syntax:
<hr />
!HTML5 Syntax:
<hr>

3
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS BORDER PROPERTY
!Configures a border on the top, right,
bottom, and left sides of an element
!Consists of
! border-width
! border-style
! border-color

 h2 { border: 2px solid #ff0000 }
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS BORDERS:
BLOCK / INLINE ELEMENTS
! Block display element
◦ default width of element content extends to
browser margin (or specified width)
! Inline display element
◦ Border closely outlines the element content
h2 { border: 2px solid #ff0000; }
a { border: 2px solid #ff0000; }
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS PADDING PROPERTY
!Configures empty space between the
content of the HTML element and the
border
!Set to 0px by default

h2 { border: 2px solid #ff0000;
padding: 5px; }
No padding property configured:
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS PADDING PROPERTY SHORTHAND:
TWO VALUES
!Two numeric values or percentages
! first value configures top and bottom padding
! the second value configures left and right
padding
!
h2 { border: 2px solid #ff0000;
background-color: #cccccc;
padding: 20px 10px;
}
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
! Four numeric values or percentages
◦ Configure top, right, bottom, and left
padding
h2 { border: 2px solid #ff0000;
width: 250px;
background-color: #cccccc;
padding: 30px 10px 5px 20px;
}
CSS PADDING PROPERTY SHORTHAND:
FOUR VALUES
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
TYPES OF
GRAPHICS
! Graphic types:
!GIF
!JPG
!PNG
14
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
GIF
! Graphics Interchange Format
! Best used for line art and logos
! Maximum of 256 colors
! One color can be configured as transparent
! Can be animated
! Uses lossless compression
15
Background
color – no
transparency
Background
color
configured to
be
transparent
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
JPEG
! Joint Photographic Experts Group
! Best used for photographs
! Up to 16.7 million colors
! Lossy compression
! Cannot be animated
! Cannot be made
transparent
16
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
PNG
!Portable Network Graphic
!Support millions of colors
!Support multiple levels of transparency
!Lossless compression
!Combines best of GIF & JPEG
17
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
HTML IMAGE ELEMENT
! Configures graphics on a web page
! src Attribute
◦ File name of the graphic
! alt Attribute
◦ Configures alternate text content (description)
! height Attribute
◦ Height of the graphic in pixels
! width Attribute
◦ Width of the graphic in pixels
18
<img src=“cake.gif” alt=“birthday cake” height=“100” width=“100”>
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
IMAGE LINKS
! To create an image hyperlink use an
anchor element to contain an image
element
! Browsers automatically add a border to
image links
! Configure CSS to eliminate the border
img {border-style:none; }
20
Home
<a href="index.html"><img src="home.gif"
height="19" width="85" alt="Home"></a>
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
THUMBNAIL IMAGE
A small image configured to link to a larger
version of that image.
<a href=“big.jpg”><img src=“small.jpg” alt=“country
road” width=“200” height=“100”></a>
21
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
IMAGE OPTIMIZATION
! The process of creating an image
with the lowest file size that still
renders a good quality image—
balancing image quality and file size.
! Photographs taken with
digital cameras are
not usually optimized for the Web
22
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
OPTIMIZE AN IMAGE FOR THE WEB
!Image Optimization
! Reduce the file size
! Reduce the dimensions of the image to the
actual width and height of the image on the
web page.
!Image Editing Tools:
! GIMP (free!)
! Adobe Fireworks
! Adobe Photoshop
! http://pixlr.com/editor (free!)
23
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CHOOSING NAMES FOR IMAGE FILES
!Use all lowercase letters
!Do not use punctuation symbols and spaces
!Do not change the file extensions
(should be .gif, .jpg, .jpeg, or .png)
!Keep your file names short but descriptive
! i1.gif is probably too short
! myimagewithmydogonmybirthday.gif is too long
! dogbday.gif may be just about right
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
ORGANIZING
YOUR SITE
<img src=“images/home.gif” alt=“Home”
height=“100” width=“200”>
25
• Place images in
their own folder
• Code the path to
the file in the src
atttribute
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
HTML5 FIGURE AND FIGCAPTION ELEMENTS
Figure Element: contains a unit of content that is
self-contained, such as an image, along with one
optional figcaption element.
<figure>
<img src="lighthouseisland.jpg" width="250"
height="355"
alt="Lighthouse Island">
<figcaption>
Island Lighthouse, Built in 1870
</figcaption>
</figure>
 
26
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS BACKGROUND-IMAGE
PROPERTY
!Configures a background-image
!By default, background images tile
(repeat)
body { background-image: url(background1.gif); }
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS BACKGROUND-REPEAT PROPERTY
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
USING BACKGROUND-REPEAT
h2 { background-color: #d5edb3;
color: #5c743d;
font-family: Georgia, "Times New Roman", serif;
padding-left: 30px;
background-image: url(trilliumbullet.gif);
background-repeat: no-repeat;
}
trilliumbullet.gif:
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
FAVORITES ICON - FAVICON
!A square image
associated
with a Web
page
!Usually named:
favicon.ico
!May display in the browser address bar,
tab, or
favorites/bookmarks list
!Configure with a link tag:
<link rel="icon" href="favicon.ico" type="image/x-icon">
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS3 ROUNDED CORNERS
!border-radius property
! Configures the horizontal radius and vertical radius of
the corner
! Numeric value(s) with unit (pixel or em) or percentage
!Browser vendor proprietary properties:
! -webkit-border-radius (for Safari & Chrome)
! -moz-border-radius (for Firefox)
! border-radius (W3C syntax)
42
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
EXAMPLES OF ROUNDED CORNERS
! One value for border-radius configures all four corners
Example:

 border-radius: 15px;
! Four values for border-radius configure each corner
separately
Ordered by top left, top right, bottom right, bottom left
Example:

 border-radius: 15px 30px 100px 5px;
43
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS3 BOX-SHADOW PROPERTY
!Configure the horizontal offset, vertical offset,
blur radius,
and valid color value
!Example:
#wrapper { -webkit-box-shadow: 5px 5px 5px #828282;
-moz-box-shadow: 5px 5px 5px #828282;
box-shadow: 5px 5px 5px #828282;}
Optional keyword: inset
44
Wednesday, April 9, 14
Copyright © Terry Felke-Morris
CSS3 TEXT-SHADOW PROPERTY
!Configure the horizontal offset, vertical offset,
blur radius,
and valid color value
!Example:
#wrapper { text-shadow: 3px 3px 3px #666; }
45
Wednesday, April 9, 14

Weitere ähnliche Inhalte

Andere mochten auch

Direct marketing of agriculture produce Training Program at Barabanki
Direct marketing of agriculture produce Training Program at BarabankiDirect marketing of agriculture produce Training Program at Barabanki
Direct marketing of agriculture produce Training Program at Barabankipromptinfotech
 
Ch. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13FCh. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13Fmh-108
 
Осознанное потребление.
Осознанное потребление.Осознанное потребление.
Осознанное потребление.Yuliya Kyamileva
 
Eligibility Criteria for Agri Consultants
Eligibility Criteria for Agri Consultants Eligibility Criteria for Agri Consultants
Eligibility Criteria for Agri Consultants promptinfotech
 
Manpower || Paccific Agro Lucknow Pvt Ltd.
Manpower || Paccific Agro Lucknow Pvt Ltd.Manpower || Paccific Agro Lucknow Pvt Ltd.
Manpower || Paccific Agro Lucknow Pvt Ltd.promptinfotech
 
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...Mario Di Carlo
 
The function of the heart
The function of the heartThe function of the heart
The function of the heartLouise Crocombe
 
Ch. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13FCh. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13Fmh-108
 
Lawrence house funds
Lawrence house fundsLawrence house funds
Lawrence house fundshousefunds57
 
Paccific Agro Lucknow Pvt Ltd.
Paccific Agro Lucknow Pvt Ltd.Paccific Agro Lucknow Pvt Ltd.
Paccific Agro Lucknow Pvt Ltd.promptinfotech
 
Ch. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13FCh. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13Fmh-108
 
Práctica cero a la oportunidad de empresa
Práctica cero a la oportunidad de empresaPráctica cero a la oportunidad de empresa
Práctica cero a la oportunidad de empresaMichael Julca Requejo
 
Безопасная одежда
Безопасная одеждаБезопасная одежда
Безопасная одеждаYuliya Kyamileva
 

Andere mochten auch (20)

Direct marketing of agriculture produce Training Program at Barabanki
Direct marketing of agriculture produce Training Program at BarabankiDirect marketing of agriculture produce Training Program at Barabanki
Direct marketing of agriculture produce Training Program at Barabanki
 
Ch. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13FCh. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13F
 
Осознанное потребление.
Осознанное потребление.Осознанное потребление.
Осознанное потребление.
 
Eligibility Criteria for Agri Consultants
Eligibility Criteria for Agri Consultants Eligibility Criteria for Agri Consultants
Eligibility Criteria for Agri Consultants
 
Manpower || Paccific Agro Lucknow Pvt Ltd.
Manpower || Paccific Agro Lucknow Pvt Ltd.Manpower || Paccific Agro Lucknow Pvt Ltd.
Manpower || Paccific Agro Lucknow Pvt Ltd.
 
2484615
24846152484615
2484615
 
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...
TAR Lazio: il Ministro dell'Interno ed il Prefetto non possono annullare le t...
 
The function of the heart
The function of the heartThe function of the heart
The function of the heart
 
Ch. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13FCh. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13F
 
Lawrence house funds
Lawrence house fundsLawrence house funds
Lawrence house funds
 
Paccific Agro Lucknow Pvt Ltd.
Paccific Agro Lucknow Pvt Ltd.Paccific Agro Lucknow Pvt Ltd.
Paccific Agro Lucknow Pvt Ltd.
 
Rac lecture 4
Rac lecture 4Rac lecture 4
Rac lecture 4
 
Ch. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13FCh. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13F
 
Layer session
Layer sessionLayer session
Layer session
 
Práctica cero a la oportunidad de empresa
Práctica cero a la oportunidad de empresaPráctica cero a la oportunidad de empresa
Práctica cero a la oportunidad de empresa
 
Sim ohms law
Sim ohms lawSim ohms law
Sim ohms law
 
Rac lecture 3
Rac lecture 3Rac lecture 3
Rac lecture 3
 
Al toolz
Al toolzAl toolz
Al toolz
 
Rac lecture 1
Rac  lecture 1Rac  lecture 1
Rac lecture 1
 
Безопасная одежда
Безопасная одеждаБезопасная одежда
Безопасная одежда
 

Ähnlich wie Ch. 4 FIT5, CIS 110 13F

Chapter4
Chapter4Chapter4
Chapter4cpashke
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Designtclanton4
 
Chapter 5 - Web Design
Chapter 5 - Web DesignChapter 5 - Web Design
Chapter 5 - Web Designtclanton4
 
Chapter 7 - Web Design
Chapter 7 - Web DesignChapter 7 - Web Design
Chapter 7 - Web Designtclanton4
 
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)Ernie Hsiung
 
Cis145 03 configuring-withcss
Cis145 03 configuring-withcssCis145 03 configuring-withcss
Cis145 03 configuring-withcssNicole77777
 

Ähnlich wie Ch. 4 FIT5, CIS 110 13F (10)

Chapter4
Chapter4Chapter4
Chapter4
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Design
 
Chapter 5 - Web Design
Chapter 5 - Web DesignChapter 5 - Web Design
Chapter 5 - Web Design
 
Chapter5
Chapter5Chapter5
Chapter5
 
Chapter7
Chapter7Chapter7
Chapter7
 
Chapter4
Chapter4Chapter4
Chapter4
 
Chapter 7 - Web Design
Chapter 7 - Web DesignChapter 7 - Web Design
Chapter 7 - Web Design
 
Chapter11
Chapter11Chapter11
Chapter11
 
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)
Impact Makes the Baby Jesus Cry (or: Font usage in WordPress Blogs)
 
Cis145 03 configuring-withcss
Cis145 03 configuring-withcssCis145 03 configuring-withcss
Cis145 03 configuring-withcss
 

Mehr von mh-108

Ch. 16 Database Case Study: XML/XSLT
Ch. 16 Database Case Study: XML/XSLTCh. 16 Database Case Study: XML/XSLT
Ch. 16 Database Case Study: XML/XSLTmh-108
 
Ch. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13FCh. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13Fmh-108
 
Ch. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13FCh. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13Fmh-108
 
Ch. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13FCh. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13Fmh-108
 
Ch. 7 FIT5, CIS 110 13F
Ch. 7 FIT5, CIS 110 13FCh. 7 FIT5, CIS 110 13F
Ch. 7 FIT5, CIS 110 13Fmh-108
 
Ch. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13FCh. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13Fmh-108
 
Ch. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13FCh. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13Fmh-108
 
FIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13FFIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13Fmh-108
 

Mehr von mh-108 (8)

Ch. 16 Database Case Study: XML/XSLT
Ch. 16 Database Case Study: XML/XSLTCh. 16 Database Case Study: XML/XSLT
Ch. 16 Database Case Study: XML/XSLT
 
Ch. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13FCh. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13F
 
Ch. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13FCh. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13F
 
Ch. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13FCh. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13F
 
Ch. 7 FIT5, CIS 110 13F
Ch. 7 FIT5, CIS 110 13FCh. 7 FIT5, CIS 110 13F
Ch. 7 FIT5, CIS 110 13F
 
Ch. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13FCh. 3 HTML5, CIS 110 13F
Ch. 3 HTML5, CIS 110 13F
 
Ch. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13FCh. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13F
 
FIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13FFIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13F
 

Kürzlich hochgeladen

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Ch. 4 FIT5, CIS 110 13F

  • 1. Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1Copyright © Terry Felke-Morris Wednesday, April 9, 14
  • 2. Copyright © Terry Felke-Morris HORIZONTAL RULE ELEMENT !Configures a horizontal line !XHTML Syntax: <hr /> !HTML5 Syntax: <hr> 3 Wednesday, April 9, 14
  • 3. Copyright © Terry Felke-Morris CSS BORDER PROPERTY !Configures a border on the top, right, bottom, and left sides of an element !Consists of ! border-width ! border-style ! border-color h2 { border: 2px solid #ff0000 } Wednesday, April 9, 14
  • 4. Copyright © Terry Felke-Morris CSS BORDERS: BLOCK / INLINE ELEMENTS ! Block display element ◦ default width of element content extends to browser margin (or specified width) ! Inline display element ◦ Border closely outlines the element content h2 { border: 2px solid #ff0000; } a { border: 2px solid #ff0000; } Wednesday, April 9, 14
  • 5. Copyright © Terry Felke-Morris CSS PADDING PROPERTY !Configures empty space between the content of the HTML element and the border !Set to 0px by default h2 { border: 2px solid #ff0000; padding: 5px; } No padding property configured: Wednesday, April 9, 14
  • 6. Copyright © Terry Felke-Morris CSS PADDING PROPERTY SHORTHAND: TWO VALUES !Two numeric values or percentages ! first value configures top and bottom padding ! the second value configures left and right padding ! h2 { border: 2px solid #ff0000; background-color: #cccccc; padding: 20px 10px; } Wednesday, April 9, 14
  • 7. Copyright © Terry Felke-Morris ! Four numeric values or percentages ◦ Configure top, right, bottom, and left padding h2 { border: 2px solid #ff0000; width: 250px; background-color: #cccccc; padding: 30px 10px 5px 20px; } CSS PADDING PROPERTY SHORTHAND: FOUR VALUES Wednesday, April 9, 14
  • 8. Copyright © Terry Felke-Morris TYPES OF GRAPHICS ! Graphic types: !GIF !JPG !PNG 14 Wednesday, April 9, 14
  • 9. Copyright © Terry Felke-Morris GIF ! Graphics Interchange Format ! Best used for line art and logos ! Maximum of 256 colors ! One color can be configured as transparent ! Can be animated ! Uses lossless compression 15 Background color – no transparency Background color configured to be transparent Wednesday, April 9, 14
  • 10. Copyright © Terry Felke-Morris JPEG ! Joint Photographic Experts Group ! Best used for photographs ! Up to 16.7 million colors ! Lossy compression ! Cannot be animated ! Cannot be made transparent 16 Wednesday, April 9, 14
  • 11. Copyright © Terry Felke-Morris PNG !Portable Network Graphic !Support millions of colors !Support multiple levels of transparency !Lossless compression !Combines best of GIF & JPEG 17 Wednesday, April 9, 14
  • 12. Copyright © Terry Felke-Morris HTML IMAGE ELEMENT ! Configures graphics on a web page ! src Attribute ◦ File name of the graphic ! alt Attribute ◦ Configures alternate text content (description) ! height Attribute ◦ Height of the graphic in pixels ! width Attribute ◦ Width of the graphic in pixels 18 <img src=“cake.gif” alt=“birthday cake” height=“100” width=“100”> Wednesday, April 9, 14
  • 13. Copyright © Terry Felke-Morris IMAGE LINKS ! To create an image hyperlink use an anchor element to contain an image element ! Browsers automatically add a border to image links ! Configure CSS to eliminate the border img {border-style:none; } 20 Home <a href="index.html"><img src="home.gif" height="19" width="85" alt="Home"></a> Wednesday, April 9, 14
  • 14. Copyright © Terry Felke-Morris THUMBNAIL IMAGE A small image configured to link to a larger version of that image. <a href=“big.jpg”><img src=“small.jpg” alt=“country road” width=“200” height=“100”></a> 21 Wednesday, April 9, 14
  • 15. Copyright © Terry Felke-Morris IMAGE OPTIMIZATION ! The process of creating an image with the lowest file size that still renders a good quality image— balancing image quality and file size. ! Photographs taken with digital cameras are not usually optimized for the Web 22 Wednesday, April 9, 14
  • 16. Copyright © Terry Felke-Morris OPTIMIZE AN IMAGE FOR THE WEB !Image Optimization ! Reduce the file size ! Reduce the dimensions of the image to the actual width and height of the image on the web page. !Image Editing Tools: ! GIMP (free!) ! Adobe Fireworks ! Adobe Photoshop ! http://pixlr.com/editor (free!) 23 Wednesday, April 9, 14
  • 17. Copyright © Terry Felke-Morris CHOOSING NAMES FOR IMAGE FILES !Use all lowercase letters !Do not use punctuation symbols and spaces !Do not change the file extensions (should be .gif, .jpg, .jpeg, or .png) !Keep your file names short but descriptive ! i1.gif is probably too short ! myimagewithmydogonmybirthday.gif is too long ! dogbday.gif may be just about right Wednesday, April 9, 14
  • 18. Copyright © Terry Felke-Morris ORGANIZING YOUR SITE <img src=“images/home.gif” alt=“Home” height=“100” width=“200”> 25 • Place images in their own folder • Code the path to the file in the src atttribute Wednesday, April 9, 14
  • 19. Copyright © Terry Felke-Morris HTML5 FIGURE AND FIGCAPTION ELEMENTS Figure Element: contains a unit of content that is self-contained, such as an image, along with one optional figcaption element. <figure> <img src="lighthouseisland.jpg" width="250" height="355" alt="Lighthouse Island"> <figcaption> Island Lighthouse, Built in 1870 </figcaption> </figure>   26 Wednesday, April 9, 14
  • 20. Copyright © Terry Felke-Morris CSS BACKGROUND-IMAGE PROPERTY !Configures a background-image !By default, background images tile (repeat) body { background-image: url(background1.gif); } Wednesday, April 9, 14
  • 21. Copyright © Terry Felke-Morris CSS BACKGROUND-REPEAT PROPERTY Wednesday, April 9, 14
  • 22. Copyright © Terry Felke-Morris USING BACKGROUND-REPEAT h2 { background-color: #d5edb3; color: #5c743d; font-family: Georgia, "Times New Roman", serif; padding-left: 30px; background-image: url(trilliumbullet.gif); background-repeat: no-repeat; } trilliumbullet.gif: Wednesday, April 9, 14
  • 23. Copyright © Terry Felke-Morris FAVORITES ICON - FAVICON !A square image associated with a Web page !Usually named: favicon.ico !May display in the browser address bar, tab, or favorites/bookmarks list !Configure with a link tag: <link rel="icon" href="favicon.ico" type="image/x-icon"> Wednesday, April 9, 14
  • 24. Copyright © Terry Felke-Morris CSS3 ROUNDED CORNERS !border-radius property ! Configures the horizontal radius and vertical radius of the corner ! Numeric value(s) with unit (pixel or em) or percentage !Browser vendor proprietary properties: ! -webkit-border-radius (for Safari & Chrome) ! -moz-border-radius (for Firefox) ! border-radius (W3C syntax) 42 Wednesday, April 9, 14
  • 25. Copyright © Terry Felke-Morris EXAMPLES OF ROUNDED CORNERS ! One value for border-radius configures all four corners Example: border-radius: 15px; ! Four values for border-radius configure each corner separately Ordered by top left, top right, bottom right, bottom left Example: border-radius: 15px 30px 100px 5px; 43 Wednesday, April 9, 14
  • 26. Copyright © Terry Felke-Morris CSS3 BOX-SHADOW PROPERTY !Configure the horizontal offset, vertical offset, blur radius, and valid color value !Example: #wrapper { -webkit-box-shadow: 5px 5px 5px #828282; -moz-box-shadow: 5px 5px 5px #828282; box-shadow: 5px 5px 5px #828282;} Optional keyword: inset 44 Wednesday, April 9, 14
  • 27. Copyright © Terry Felke-Morris CSS3 TEXT-SHADOW PROPERTY !Configure the horizontal offset, vertical offset, blur radius, and valid color value !Example: #wrapper { text-shadow: 3px 3px 3px #666; } 45 Wednesday, April 9, 14