SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
The web context
Fast, Easy, Complicated, and Powerful Web
   ITP, Spring 2011, section 1, session 1
         Dan Phiffer dan@phiffer.org
Fast, Easy, Complicated, and Powerful Web
Fast, Easy, Complicated...


• Casual content management in general
• WordPress development in particular
• One major project
• In six sessions
Six sessions


• 1 week PHP overview
• 4 weeks WordPress development
• Project presentations
Projects


• Warm-up PHP exercise
• WordPress child theme
• WordPress theme from scratch
• Final project
Casual content management
Casual content
management

• Easily changing what’s on the page
• Using code to construct how it’s
  presented

• Casual in that we’re not trying to
  build enterprise systems
How does it work?
How does it work?
The web is made out
      of text
What parts contribute
to a web page?

• HTML
• CSS
• JavaScript
• Media
Markup


• HTML         • Tags
                 <div>...</div>

• CSS            <span>...</span>



• JavaScript   • Attributes
                 <p id="intro">...</p>
                 <a href="home.html">...</a>
• Media
               • Content
                 <h1>oh hai</h1>
                 <img src="pong.gif" alt="" />
Stylesheets


• HTML         • Selectors
                 #home { ... }

• CSS            a.selected { ... }
                 input { ... }


• JavaScript   • Properties
                 a { color: #ABB94A; }

• Media          p { font-size: 1.5em; }
                 body {
                   margin: 30px;
                   text-align: center;
                 }
Scripting


• HTML         • Flexible
• CSS          • Powerful
• JavaScript   • Kind of weird
• Media
Non-textual media


• HTML         • Images
                <img src="..." alt="..." />

• CSS          • Audio
                <audio src="...">...</audio>
• JavaScript
• Media        • Video
                <video src="...">...</video>


               • Canvas
                <canvas id="..."></canvas>
Back-end


• HTML         Content management
               is code that lets users
• CSS          modify the HTML and
• JavaScript   media parts of a page
               through a simple
• Media        interface
The big picture


• HTML presents data to the user
• Forms allow us to receive data from the user
• PHP constructs dynamic HTML and handles user-
  submitted data

• WordPress is written in PHP
The bigger picture

• PHP runs in a web server (Apache) and
  connects to a database (MySQL)

• MAMP (or XAMPP) is a convenient
  package to run Apache, MySQL and
  PHP

• A text editor (e.g., jEdit) is needed to
  create and edit your files
Starting from scratch
The minimal web page

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
  </head>
  <body>
    (Empty page)
  </body>
</html>
Add some content

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
  </head>
  <body>
    <?php echo "Hello, world!"; ?>
  </body>
</html>
External CSS
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
    <link rel="stylesheet" href="style.css" />
    <style>
    body { font: 72px palatino, serif; }
    </style>
  </head>
  <body style="margin: 20px;">
    <?php echo "Hello, world!"; ?>
  </body>
</html>
Embedded CSS
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
    <link rel="stylesheet" href="style.css" />
    <style>
    body { font: 72px palatino, serif; }
    </style>
  </head>
  <body style="margin: 20px;">
    <?php echo "Hello, world!"; ?>
  </body>
</html>
Inline CSS
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
    <link rel="stylesheet" href="style.css" />
    <style>
    body { font: 72px palatino, serif; }
    </style>
  </head>
  <body style="margin: 20px;">
    <?php echo "Hello, world!"; ?>
  </body>
</html>
Add an image
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type"
          content="text/html; charset=utf-8" />
    <title>Untitled</title>
    <link rel="stylesheet" href="style.css" />
    <style>
    body { font: 72px palatino, serif; }
    </style>
  </head>
  <body style="margin: 20px;">
    <img src="images/penguins.gif" alt="Let's begin!" />
  </body>
</html>
Anchor links
<a href="page.html">Hello</a>



• The href attribute defines where the
   link goes (to page.html)

• The content between tags (“hello”)
   determines what is clickable
Types of URLs


• Absolute http://phiffer.org/
• Relative ../images/title.png or css/style.css
• Host-absolute /images/title.jpg
• Hash link #top (<div id="top"></div>)
HTML & CSS references


• Don’t try to memorize, instead learn
  how to find the information you need

• W3Schools
• Mozilla Developer Network
• Dive into HTML5

Contenu connexe

Tendances

Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)Thinkful
 
快速开发Css
快速开发Css快速开发Css
快速开发Csstbmallf2e
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Web programming css
Web programming cssWeb programming css
Web programming cssUma mohan
 
Building a WordPress theme
Building a WordPress themeBuilding a WordPress theme
Building a WordPress themeJosh Lee
 
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012WordCamp Sydney
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate PackageSimon Collison
 
Advanced Wordpress
Advanced WordpressAdvanced Wordpress
Advanced Wordpresslexinamer
 
Xhtml and html5 basics
Xhtml and html5 basicsXhtml and html5 basics
Xhtml and html5 basicsmessinam
 
Open Source CMS Playroom
Open Source CMS PlayroomOpen Source CMS Playroom
Open Source CMS Playroomlibrarywebchic
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tipsChris Love
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsSuzanne Dergacheva
 

Tendances (20)

Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
 
快速开发Css
快速开发Css快速开发Css
快速开发Css
 
Css
CssCss
Css
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
 
Building a WordPress theme
Building a WordPress themeBuilding a WordPress theme
Building a WordPress theme
 
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
 
Module 3 - Intro to Bootstrap
Module 3 - Intro to BootstrapModule 3 - Intro to Bootstrap
Module 3 - Intro to Bootstrap
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate Package
 
Advanced Wordpress
Advanced WordpressAdvanced Wordpress
Advanced Wordpress
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
Xhtml and html5 basics
Xhtml and html5 basicsXhtml and html5 basics
Xhtml and html5 basics
 
Open Source CMS Playroom
Open Source CMS PlayroomOpen Source CMS Playroom
Open Source CMS Playroom
 
Css1
Css1Css1
Css1
 
Start using less css
Start using less cssStart using less css
Start using less css
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
Less presentation
Less presentationLess presentation
Less presentation
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen Grids
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
 

Similaire à The web context

HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
Html5 shubelal
Html5 shubelalHtml5 shubelal
Html5 shubelalShub
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...SPTechCon
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is nowGonzalo Cordero
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxsilvers5
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlantaThinkful
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web DevelopmentDaryll Chu
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflowPeter Kaizer
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHPSteve Fort
 
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
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designersPai-Cheng Tao
 

Similaire à The web context (20)

HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Html5 shubelal
Html5 shubelalHtml5 shubelal
Html5 shubelal
 
Lecture 2 - HTML Basics
Lecture 2 - HTML BasicsLecture 2 - HTML Basics
Lecture 2 - HTML Basics
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
 
Html5
Html5Html5
Html5
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
 
web development
web developmentweb development
web development
 
web dev
web devweb dev
web dev
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
 
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
 
Html5 public
Html5 publicHtml5 public
Html5 public
 
Html,CSS & UI/UX design
Html,CSS & UI/UX designHtml,CSS & UI/UX design
Html,CSS & UI/UX design
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
CSS
CSSCSS
CSS
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 

Plus de Dan Phiffer

Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptDan Phiffer
 
Static layouts with css
Static layouts with cssStatic layouts with css
Static layouts with cssDan Phiffer
 
Word press templates
Word press templatesWord press templates
Word press templatesDan Phiffer
 
Intro to word press
Intro to word pressIntro to word press
Intro to word pressDan Phiffer
 

Plus de Dan Phiffer (7)

Occupy.here
Occupy.hereOccupy.here
Occupy.here
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Static layouts with css
Static layouts with cssStatic layouts with css
Static layouts with css
 
Word press templates
Word press templatesWord press templates
Word press templates
 
Intro to word press
Intro to word pressIntro to word press
Intro to word press
 
Diving into php
Diving into phpDiving into php
Diving into php
 
Web tech 101
Web tech 101Web tech 101
Web tech 101
 

Dernier

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
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
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
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
 
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
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
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
 
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
 
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
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 

Dernier (20)

Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
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
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
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
 
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
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
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
 
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
 
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
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 

The web context

  • 1. The web context Fast, Easy, Complicated, and Powerful Web ITP, Spring 2011, section 1, session 1 Dan Phiffer dan@phiffer.org
  • 2. Fast, Easy, Complicated, and Powerful Web
  • 3. Fast, Easy, Complicated... • Casual content management in general • WordPress development in particular • One major project • In six sessions
  • 4. Six sessions • 1 week PHP overview • 4 weeks WordPress development • Project presentations
  • 5. Projects • Warm-up PHP exercise • WordPress child theme • WordPress theme from scratch • Final project
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Casual content management • Easily changing what’s on the page • Using code to construct how it’s presented • Casual in that we’re not trying to build enterprise systems
  • 12. How does it work?
  • 13. How does it work?
  • 14. The web is made out of text
  • 15. What parts contribute to a web page? • HTML • CSS • JavaScript • Media
  • 16. Markup • HTML • Tags <div>...</div> • CSS <span>...</span> • JavaScript • Attributes <p id="intro">...</p> <a href="home.html">...</a> • Media • Content <h1>oh hai</h1> <img src="pong.gif" alt="" />
  • 17. Stylesheets • HTML • Selectors #home { ... } • CSS a.selected { ... } input { ... } • JavaScript • Properties a { color: #ABB94A; } • Media p { font-size: 1.5em; } body { margin: 30px; text-align: center; }
  • 18. Scripting • HTML • Flexible • CSS • Powerful • JavaScript • Kind of weird • Media
  • 19. Non-textual media • HTML • Images <img src="..." alt="..." /> • CSS • Audio <audio src="...">...</audio> • JavaScript • Media • Video <video src="...">...</video> • Canvas <canvas id="..."></canvas>
  • 20. Back-end • HTML Content management is code that lets users • CSS modify the HTML and • JavaScript media parts of a page through a simple • Media interface
  • 21. The big picture • HTML presents data to the user • Forms allow us to receive data from the user • PHP constructs dynamic HTML and handles user- submitted data • WordPress is written in PHP
  • 22. The bigger picture • PHP runs in a web server (Apache) and connects to a database (MySQL) • MAMP (or XAMPP) is a convenient package to run Apache, MySQL and PHP • A text editor (e.g., jEdit) is needed to create and edit your files
  • 24. The minimal web page <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> </head> <body> (Empty page) </body> </html>
  • 25. Add some content <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> </head> <body> <?php echo "Hello, world!"; ?> </body> </html>
  • 26. External CSS <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <link rel="stylesheet" href="style.css" /> <style> body { font: 72px palatino, serif; } </style> </head> <body style="margin: 20px;"> <?php echo "Hello, world!"; ?> </body> </html>
  • 27. Embedded CSS <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <link rel="stylesheet" href="style.css" /> <style> body { font: 72px palatino, serif; } </style> </head> <body style="margin: 20px;"> <?php echo "Hello, world!"; ?> </body> </html>
  • 28. Inline CSS <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <link rel="stylesheet" href="style.css" /> <style> body { font: 72px palatino, serif; } </style> </head> <body style="margin: 20px;"> <?php echo "Hello, world!"; ?> </body> </html>
  • 29. Add an image <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <link rel="stylesheet" href="style.css" /> <style> body { font: 72px palatino, serif; } </style> </head> <body style="margin: 20px;"> <img src="images/penguins.gif" alt="Let's begin!" /> </body> </html>
  • 30. Anchor links <a href="page.html">Hello</a> • The href attribute defines where the link goes (to page.html) • The content between tags (“hello”) determines what is clickable
  • 31. Types of URLs • Absolute http://phiffer.org/ • Relative ../images/title.png or css/style.css • Host-absolute /images/title.jpg • Hash link #top (<div id="top"></div>)
  • 32. HTML & CSS references • Don’t try to memorize, instead learn how to find the information you need • W3Schools • Mozilla Developer Network • Dive into HTML5