SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Speaking in Code




HTML Recap and CSS


Professor Liel Leibovitz
Brian Lee
Carolynn Vu (TA)
Speaking in Code


Recap: HTML – Lists

My Favorite Artists    • Let It Be

1. The Beatles         • Eye of the Tiger

2. Passion Pit         • Harlem Shake

3. Kendrick Lamar




Song Recommendations
Speaking in Code


Recap: HTML – List Items <li>

Worst Catchy Songs    <body>
                          <h2>Worst Catchy Songs</h2>
                          <ol>
1. Friday                      <li>Friday</li>
                               <li>Call me Maybe</li>
2. Call Me Maybe               <li>Barbie Girl</li>
                          </ol>
3. Barbie Girl        </body>
Speaking in Code


Recap: HTML – Comments

• Comments help HUMANS read code

• Do not render in browser

<!– Haha you guys can’t see me  (HTML)

// Comments exist in pretty much every language (Javascript)

# Dear future me, I’m so sorry this code looks like my ass (Ruby)
Speaking in Code
Speaking in Code


Recap: HTML – Attributes

• Attributes go into the opening tags

• Can do multiple attributes at a time

<img src=‘jumanji.png’/>

<h1 style=‘font-family:Garamond’/>Ew Times New Roman sucks</h1>

<p style=‘text-align:center; color:red’/>Can’t wait for Game of Thrones!</p>

<div id=‘tv-shows’/><div>
Speaking in Code


Recap: HTML – Styles

• All styles do exactly what they say

color: red

font-family: Garamond

font-size: 10px

text-align: center

background-color: pink
Speaking in Code


HTML: Tables
• Same concept as lists

• Instead of list item, there are cells
<table border=‘1px’> <!- - Initialize the table, just like <ol> or <ul> - - 
    <tr> <!- - table row - - 
         <td>King Kong</td> <!- - table data, similar to <li> tags- - 
         <td>1933</td>
    </tr>
    <tr>
         <td>Dracula</td>
         <td>1897</td>
    </tr>
</table>
Speaking in Code


<thead> vs <tbody>
• Same concept as HTML <head> vs <body>
<thead> <!- - initiates the table header - - 

<tbody> <!- - data and information inside - - 

<thead>
     <tr>
            <th>Famous Monsters</th>
     <tr>
</thead>
<tbody>
     <tr>
            <td>Dracula</td>
     <tr>
</tbody>
Speaking in Code


HTML: <div> and <span>

• Allows you to organize your content

• Crucial for CSS


<div> <!- - short for divider, separate this content from others - - 

<span> <!- - used mainly to group inline elements in text- - 
Speaking in Code


Cascading Style Sheets (CSS)
• Separate content (HTML) from style (CSS)
• Save under a different name
    – ie) stylesheet.css

• Link two documents through style tag
• Goes into the <head> of the HTML document

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
Speaking in Code


Why use CSS?

• Global styling to more than one HTML file

• Can be as specific as you want also

• Syntax: (change all paragraphs)
p{
     color: red;
     text-align: right;
}
Speaking in Code


Tip: Using CSS Effectively

• Use attributes
<div id=‘tv-shows’/><div>

<span class=‘make-all-blue’/><span>

div#tv-shows {
     color: purple;
     text-align: center;
}

span.make-all-blue {
     color: blue;
}
Speaking in Code


A Different Approach <style>

• Not best practice, but don’t need to link stylesheet
<html>
    <head>
        <style>
             p{
                   color: purple;
              }
        </style>
        <title>Result</title>
    </head>
    <body>
        <p>Check it out! I'm purple!</p>
    </body>
</html>
Speaking in Code


Text Editors

• Where do we actually write code?

• Codecademy is a set environment
Speaking in Code




Microsoft FrontPage (some NOOB!)
Speaking in Code




DreamWeaver (Still Pretty Noob)
Speaking in Code




Sublime Text (some respect)
Speaking in Code




VIM (freaking pros)
Speaking in Code


Only writing HTML?

Default programs

• Mac: Make sure to change format to plain text
  (COMMAND > SHIFT> T)

   – TextEdit

• PC:
   – Notepad
Speaking in Code


Ready to Try It Yourself?

http://bit.ly/basiccss
Speaking in Code


Sync-Up!

• Comments in CSS

/*Just another syntax*/

• Hexidecimal colors
color: #cc0000;
Speaking in Code


CSS Syntax
div {
        width: 100%;
}

a.make_me_red { /*periods denote class attribute */
    color: red; /*separate with semi-colons */
    text-decoration: none;
}

h1#only_this_one {/*hashes or octothorpes denote class attribute */
   background-color: blue;
}

Weitere ähnliche Inhalte

Was ist angesagt?

Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSNYCSS Meetup
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to csseShikshak
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014James Strang
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workAlbino Tonnina
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Aditya Dwivedi
 

Was ist angesagt? (20)

Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
 
Css1
Css1Css1
Css1
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Le Wagon - Landing page
Le Wagon - Landing pageLe Wagon - Landing page
Le Wagon - Landing page
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Html css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers workHtml css workshop, lesson 0, how browsers work
Html css workshop, lesson 0, how browsers work
 
Css introduction
Css   introductionCss   introduction
Css introduction
 
2h landing page
2h landing page 2h landing page
2h landing page
 
Css 3
Css 3Css 3
Css 3
 
Css 3
Css 3Css 3
Css 3
 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
Html Expression Web
Html Expression WebHtml Expression Web
Html Expression Web
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
Khoa dang (kay)
Khoa dang (kay)Khoa dang (kay)
Khoa dang (kay)
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Coder son site web
Coder son site webCoder son site web
Coder son site web
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
 

Andere mochten auch

Andere mochten auch (7)

Wordpress.com les 3
Wordpress.com les 3Wordpress.com les 3
Wordpress.com les 3
 
Olympus+E+5+image
Olympus+E+5+imageOlympus+E+5+image
Olympus+E+5+image
 
I T Evolution
I T  EvolutionI T  Evolution
I T Evolution
 
I Am GO Stories
I Am GO StoriesI Am GO Stories
I Am GO Stories
 
SLFC Service Offering Constellation
SLFC Service Offering ConstellationSLFC Service Offering Constellation
SLFC Service Offering Constellation
 
Organiseerhetweb
OrganiseerhetwebOrganiseerhetweb
Organiseerhetweb
 
Pr Network 8 CHCs Movements
Pr Network 8 CHCs MovementsPr Network 8 CHCs Movements
Pr Network 8 CHCs Movements
 

Ähnlich wie Week 3 html recap and css

Week 4 css recap and js
Week 4   css recap and jsWeek 4   css recap and js
Week 4 css recap and jsbrianjihoonlee
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for cssshabab shihan
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxkarthiksmart21
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8RohanMistry15
 
The Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSThe Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSkcasavale
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLToni Kolev
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursSandrine Ayral
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSTJ Stalcup
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursYannKlein2
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSSSyed Sami
 
WEB PROGRAMMING- Web page creation using HTML Tags
WEB PROGRAMMING-  Web page creation using HTML TagsWEB PROGRAMMING-  Web page creation using HTML Tags
WEB PROGRAMMING- Web page creation using HTML Tagsjananisairam
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 

Ähnlich wie Week 3 html recap and css (20)

Week 4 css recap and js
Week 4   css recap and jsWeek 4   css recap and js
Week 4 css recap and js
 
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
HTML News Packages Lesson
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
Css Basics
Css BasicsCss Basics
Css Basics
 
CSS
CSSCSS
CSS
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8
 
HTML
HTMLHTML
HTML
 
The Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSThe Language of the Web - HTML and CSS
The Language of the Web - HTML and CSS
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hours
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hours
 
HTML Bootcamp
HTML BootcampHTML Bootcamp
HTML Bootcamp
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
 
WEB PROGRAMMING- Web page creation using HTML Tags
WEB PROGRAMMING-  Web page creation using HTML TagsWEB PROGRAMMING-  Web page creation using HTML Tags
WEB PROGRAMMING- Web page creation using HTML Tags
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 

Week 3 html recap and css

  • 1. Speaking in Code HTML Recap and CSS Professor Liel Leibovitz Brian Lee Carolynn Vu (TA)
  • 2. Speaking in Code Recap: HTML – Lists My Favorite Artists • Let It Be 1. The Beatles • Eye of the Tiger 2. Passion Pit • Harlem Shake 3. Kendrick Lamar Song Recommendations
  • 3. Speaking in Code Recap: HTML – List Items <li> Worst Catchy Songs <body> <h2>Worst Catchy Songs</h2> <ol> 1. Friday <li>Friday</li> <li>Call me Maybe</li> 2. Call Me Maybe <li>Barbie Girl</li> </ol> 3. Barbie Girl </body>
  • 4. Speaking in Code Recap: HTML – Comments • Comments help HUMANS read code • Do not render in browser <!– Haha you guys can’t see me  (HTML) // Comments exist in pretty much every language (Javascript) # Dear future me, I’m so sorry this code looks like my ass (Ruby)
  • 6. Speaking in Code Recap: HTML – Attributes • Attributes go into the opening tags • Can do multiple attributes at a time <img src=‘jumanji.png’/> <h1 style=‘font-family:Garamond’/>Ew Times New Roman sucks</h1> <p style=‘text-align:center; color:red’/>Can’t wait for Game of Thrones!</p> <div id=‘tv-shows’/><div>
  • 7. Speaking in Code Recap: HTML – Styles • All styles do exactly what they say color: red font-family: Garamond font-size: 10px text-align: center background-color: pink
  • 8. Speaking in Code HTML: Tables • Same concept as lists • Instead of list item, there are cells <table border=‘1px’> <!- - Initialize the table, just like <ol> or <ul> - -  <tr> <!- - table row - -  <td>King Kong</td> <!- - table data, similar to <li> tags- -  <td>1933</td> </tr> <tr> <td>Dracula</td> <td>1897</td> </tr> </table>
  • 9. Speaking in Code <thead> vs <tbody> • Same concept as HTML <head> vs <body> <thead> <!- - initiates the table header - -  <tbody> <!- - data and information inside - -  <thead> <tr> <th>Famous Monsters</th> <tr> </thead> <tbody> <tr> <td>Dracula</td> <tr> </tbody>
  • 10. Speaking in Code HTML: <div> and <span> • Allows you to organize your content • Crucial for CSS <div> <!- - short for divider, separate this content from others - -  <span> <!- - used mainly to group inline elements in text- - 
  • 11. Speaking in Code Cascading Style Sheets (CSS) • Separate content (HTML) from style (CSS) • Save under a different name – ie) stylesheet.css • Link two documents through style tag • Goes into the <head> of the HTML document <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
  • 12. Speaking in Code Why use CSS? • Global styling to more than one HTML file • Can be as specific as you want also • Syntax: (change all paragraphs) p{ color: red; text-align: right; }
  • 13. Speaking in Code Tip: Using CSS Effectively • Use attributes <div id=‘tv-shows’/><div> <span class=‘make-all-blue’/><span> div#tv-shows { color: purple; text-align: center; } span.make-all-blue { color: blue; }
  • 14. Speaking in Code A Different Approach <style> • Not best practice, but don’t need to link stylesheet <html> <head> <style> p{ color: purple; } </style> <title>Result</title> </head> <body> <p>Check it out! I'm purple!</p> </body> </html>
  • 15. Speaking in Code Text Editors • Where do we actually write code? • Codecademy is a set environment
  • 16. Speaking in Code Microsoft FrontPage (some NOOB!)
  • 17. Speaking in Code DreamWeaver (Still Pretty Noob)
  • 18. Speaking in Code Sublime Text (some respect)
  • 19. Speaking in Code VIM (freaking pros)
  • 20. Speaking in Code Only writing HTML? Default programs • Mac: Make sure to change format to plain text (COMMAND > SHIFT> T) – TextEdit • PC: – Notepad
  • 21. Speaking in Code Ready to Try It Yourself? http://bit.ly/basiccss
  • 22. Speaking in Code Sync-Up! • Comments in CSS /*Just another syntax*/ • Hexidecimal colors color: #cc0000;
  • 23. Speaking in Code CSS Syntax div { width: 100%; } a.make_me_red { /*periods denote class attribute */ color: red; /*separate with semi-colons */ text-decoration: none; } h1#only_this_one {/*hashes or octothorpes denote class attribute */ background-color: blue; }

Hinweis der Redaktion

  1. Ask which list is what. &lt;ol&gt;, &lt;ul&gt;
  2. Make alternating slides to quiz individually
  3. Ask how many columns there would be
  4. Questions on how /where to write html