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
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxlekhacce
 

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
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx
 

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

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Dernier (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

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