SlideShare une entreprise Scribd logo
1  sur  16
Week 03
Images and Typography
Images in HTML




<img src="images/full/factory.jpg" alt="factory-pic" title="Factory" />
Images in HTML




Start Tag                                             Alternate text if                           End Tag
                                                      image doesn't
        Search      Path to Image         Alternate       appear          Title     Image Title
        Attribute                         Attribute                       Attribute



   <img src="images/full/factory.jpg" alt="factory-pic" title="Factory" />
IMAGE TYPES: GIFs, JPGs, PNGs

GIF           Low quality, use for simple graphics
              only.




JPG           Photographic Imagery, Complex
              patters or gradients.




              Images with Alpha Transperency
PNG
Background Images in CSS

          HTML                                CSS                               Browser


<body>                          body {
                                  background-color: grey;
     <div id="box">             }
                                                                       This sentence is the intro to this
          <p>This sentence is
          the intro to this     p {                                              paragraph.
          paragraphs. </p>        font-size: 14px;
          </div>                  color: white;
                                  text-align: center;
</body>                           margin-top: 30px;
                                }

                                #box {
                                    height: 300px;
                                    width: 400px;
                                    border: 2px solid green;
                                    background-image:
                                      url('../images/factory2.jpg');
                                }
Background Images in CSS

          HTML                                CSS                               Browser


<body>                          body {
                                  background-color: grey;
     <div id="box">             }
                                                                       This sentence is the intro to this
          <p>This sentence is
          the intro to this     p {                                              paragraph.
          paragraphs. </p>        font-size: 14px;
          </div>                  color: white;
                                  text-align: center;
</body>                           margin-top: 28px;
                                }

                                #box {
                                    height: 300px;
                                    width: 400px;
                                    border: 2px solid green;
                                    background-image:
                                      url('../images/factory2.jpg');
                                }
Font-Family


   Font Family Property   Desired Font       Next Best   Most General



h1 {
             font-family: "Trebuchet MS", Helvetica, sans-serif;
   }
                                         Font Stack
Embedding Fonts

      CSS

@font-face {
    font-family: coolfont;
    src: url('fonts/coolfont.ttf'),   url('fonts/coolfont.eot');
}

p {
       font-family: coolfont, arial, sans-serif;
}
Embedding Fonts

      CSS
                                                     give the font a
@font-face {                                         simple name
    font-family: coolfont;
    src: url('fonts/coolfont.ttf'),   url('fonts/coolfont.eot');
}

p {
       font-family: coolfont, arial, sans-serif;
}
Embedding Fonts
                                                .OTF and .TTF fonts
                                                work with all browsers
      CSS                                       but Internet Explorer

@font-face {
    font-family: coolfont;
    src: url('fonts/coolfont.ttf'),   url('fonts/coolfont.eot');
}

p {
       font-family: coolfont, arial, sans-serif;
}
                                                   .EOT format required for
                                                   Internet Explorer Use.
Embedding Fonts

                                                   paths to the font files, in
      CSS
                                                   a font folder.
@font-face {
    font-family: coolfont;
    src: url('fonts/coolfont.ttf'), url('fonts/coolfont.eot');
}

p {
       font-family: coolfont, arial, sans-serif;
}
Embedding Fonts

      CSS - without IE code...

@font-face {
    font-family: coolfont;
    src: url('fonts/coolfont.ttf');
}

p {
       font-family: coolfont, arial, sans-serif;
}
Resetting Default CSS Styles
      CSS

* {
      vertical-align: baseline;
      font-weight: inherit;
      font-family: inherit;
      font-style: inherit;
      font-size: 100%;
      border: 0 none;
      outline: 0;
      padding: 0;
      margin: 0;
      }
Styling Links w/ Pseudo-classes
      CSS

a:link {
    color: blue;
    text-decoration: none;
    }

a:visited {
    color: lightBlue;
    text-decoration: none;
    }

a:hover {
    color: white;
    background-color: yellow;
    text-decoration: none;
    }

a:active {
    color: blue;
    text-decoration: none;
    }
Styling Links w/ Pseudo-classes
      CSS

a:link {
    color: blue;
    text-decoration: none;
    }

a:visited {
                                 PSEUDO-CLASSES
    color: lightBlue;
    text-decoration: none;
    }

a:hover {
    color: white;
    background-color: yellow;
    text-decoration: none;
    }

a:active {
    color: blue;
    text-decoration: none;
    }
Styling Links w/ Pseudo-classes
      CSS

a:link {                        Unvisited Link
    color: blue;
    text-decoration: none;
    }

a:visited {                     Visited Link
    color: lightBlue;
    text-decoration: none;
    }

a:hover {                       Mouse Over Link
    color: white;
    background-color: yellow;
    text-decoration: none;
    }

a:active {                      Selected Link
    color: blue;
    text-decoration: none;
    }

Contenu connexe

Tendances

Basic HTML & CSS
Basic HTML & CSSBasic HTML & CSS
Basic HTML & CSS
John Nelson
 

Tendances (19)

HTML By K.Sasidhar
HTML By K.SasidharHTML By K.Sasidhar
HTML By K.Sasidhar
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Html
HtmlHtml
Html
 
Basic html tags
Basic html tagsBasic html tags
Basic html tags
 
Html full
Html fullHtml full
Html full
 
HTML & XHTML Basics
HTML & XHTML BasicsHTML & XHTML Basics
HTML & XHTML Basics
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
Basic HTML & CSS
Basic HTML & CSSBasic HTML & CSS
Basic HTML & CSS
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Html5
Html5Html5
Html5
 
Html Tags
Html TagsHtml Tags
Html Tags
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
HTML
HTMLHTML
HTML
 
Web Page Designing Using HTML
Web Page Designing Using HTMLWeb Page Designing Using HTML
Web Page Designing Using HTML
 
User Defined Characters Solution Proposal
User Defined Characters Solution ProposalUser Defined Characters Solution Proposal
User Defined Characters Solution Proposal
 
Css1
Css1Css1
Css1
 
HTML/CSS Lecture 1
HTML/CSS Lecture 1HTML/CSS Lecture 1
HTML/CSS Lecture 1
 

Similaire à ID01 Week 3

waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
Ismaciil2
 
Css 1
Css 1Css 1
Css 1
H K
 
Css+tutorial+in+bangla
Css+tutorial+in+banglaCss+tutorial+in+bangla
Css+tutorial+in+bangla
jessicaemily
 

Similaire à ID01 Week 3 (20)

Css1
Css1Css1
Css1
 
html
htmlhtml
html
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 
Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)
 
Css(handbook)
Css(handbook)Css(handbook)
Css(handbook)
 
Estilos Css
Estilos CssEstilos Css
Estilos Css
 
css-note.pptx
css-note.pptxcss-note.pptx
css-note.pptx
 
CSS'in Gücü Adına
CSS'in Gücü AdınaCSS'in Gücü Adına
CSS'in Gücü Adına
 
Css 1
Css 1Css 1
Css 1
 
LessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingLessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG Meeting
 
CSS
CSSCSS
CSS
 
Web Design Assignment 1
Web Design Assignment 1 Web Design Assignment 1
Web Design Assignment 1
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Finding a Better Way to CSS: Navigating Sass with Compass
Finding a Better Way to CSS: Navigating Sass with CompassFinding a Better Way to CSS: Navigating Sass with Compass
Finding a Better Way to CSS: Navigating Sass with Compass
 
HTML & CSS Basics
HTML & CSS BasicsHTML & CSS Basics
HTML & CSS Basics
 
Css tips & tricks
Css tips & tricksCss tips & tricks
Css tips & tricks
 
Css+tutorial+in+bangla
Css+tutorial+in+banglaCss+tutorial+in+bangla
Css+tutorial+in+bangla
 
Cascade.ss
Cascade.ssCascade.ss
Cascade.ss
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

ID01 Week 3

  • 1. Week 03 Images and Typography
  • 2. Images in HTML <img src="images/full/factory.jpg" alt="factory-pic" title="Factory" />
  • 3. Images in HTML Start Tag Alternate text if End Tag image doesn't Search Path to Image Alternate appear Title Image Title Attribute Attribute Attribute <img src="images/full/factory.jpg" alt="factory-pic" title="Factory" />
  • 4. IMAGE TYPES: GIFs, JPGs, PNGs GIF Low quality, use for simple graphics only. JPG Photographic Imagery, Complex patters or gradients. Images with Alpha Transperency PNG
  • 5. Background Images in CSS HTML CSS Browser <body> body { background-color: grey; <div id="box"> } This sentence is the intro to this <p>This sentence is the intro to this p { paragraph. paragraphs. </p> font-size: 14px; </div> color: white; text-align: center; </body> margin-top: 30px; } #box { height: 300px; width: 400px; border: 2px solid green; background-image: url('../images/factory2.jpg'); }
  • 6. Background Images in CSS HTML CSS Browser <body> body { background-color: grey; <div id="box"> } This sentence is the intro to this <p>This sentence is the intro to this p { paragraph. paragraphs. </p> font-size: 14px; </div> color: white; text-align: center; </body> margin-top: 28px; } #box { height: 300px; width: 400px; border: 2px solid green; background-image: url('../images/factory2.jpg'); }
  • 7. Font-Family Font Family Property Desired Font Next Best Most General h1 { font-family: "Trebuchet MS", Helvetica, sans-serif; } Font Stack
  • 8. Embedding Fonts CSS @font-face { font-family: coolfont; src: url('fonts/coolfont.ttf'), url('fonts/coolfont.eot'); } p { font-family: coolfont, arial, sans-serif; }
  • 9. Embedding Fonts CSS give the font a @font-face { simple name font-family: coolfont; src: url('fonts/coolfont.ttf'), url('fonts/coolfont.eot'); } p { font-family: coolfont, arial, sans-serif; }
  • 10. Embedding Fonts .OTF and .TTF fonts work with all browsers CSS but Internet Explorer @font-face { font-family: coolfont; src: url('fonts/coolfont.ttf'), url('fonts/coolfont.eot'); } p { font-family: coolfont, arial, sans-serif; } .EOT format required for Internet Explorer Use.
  • 11. Embedding Fonts paths to the font files, in CSS a font folder. @font-face { font-family: coolfont; src: url('fonts/coolfont.ttf'), url('fonts/coolfont.eot'); } p { font-family: coolfont, arial, sans-serif; }
  • 12. Embedding Fonts CSS - without IE code... @font-face { font-family: coolfont; src: url('fonts/coolfont.ttf'); } p { font-family: coolfont, arial, sans-serif; }
  • 13. Resetting Default CSS Styles CSS * { vertical-align: baseline; font-weight: inherit; font-family: inherit; font-style: inherit; font-size: 100%; border: 0 none; outline: 0; padding: 0; margin: 0; }
  • 14. Styling Links w/ Pseudo-classes CSS a:link { color: blue; text-decoration: none; } a:visited { color: lightBlue; text-decoration: none; } a:hover { color: white; background-color: yellow; text-decoration: none; } a:active { color: blue; text-decoration: none; }
  • 15. Styling Links w/ Pseudo-classes CSS a:link { color: blue; text-decoration: none; } a:visited { PSEUDO-CLASSES color: lightBlue; text-decoration: none; } a:hover { color: white; background-color: yellow; text-decoration: none; } a:active { color: blue; text-decoration: none; }
  • 16. Styling Links w/ Pseudo-classes CSS a:link { Unvisited Link color: blue; text-decoration: none; } a:visited { Visited Link color: lightBlue; text-decoration: none; } a:hover { Mouse Over Link color: white; background-color: yellow; text-decoration: none; } a:active { Selected Link color: blue; text-decoration: none; }

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n