SlideShare a Scribd company logo
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
The web context
The web context
The web context
The web context
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

More Related Content

PPTX
Basics of Front End Web Dev PowerPoint
PPTX
Week01 jan19 introductionto_php
KEY
Efficient theming in Drupal
PPT
Club website demo
PPTX
Hammersmith fundamentals html fundamentals
PPTX
How to dominate a free theme WCTO 2014
PPTX
Web1O1 - Intro to HTML/CSS
Basics of Front End Web Dev PowerPoint
Week01 jan19 introductionto_php
Efficient theming in Drupal
Club website demo
Hammersmith fundamentals html fundamentals
How to dominate a free theme WCTO 2014
Web1O1 - Intro to HTML/CSS

What's hot (20)

PDF
Html:css crash course (4:5)
PDF
快速开发Css
PPT
PDF
Week01 jan19 introductionto_php
PPTX
Web programming css
PPTX
.Less - CSS done right
PPTX
Building a WordPress theme
PDF
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
PPTX
Module 3 - Intro to Bootstrap
PDF
Developing Your Ultimate Package
PPTX
Advanced Wordpress
PDF
CSS Best practice
PPTX
Xhtml and html5 basics
KEY
Open Source CMS Playroom
PPT
PPTX
Start using less css
PPT
Css best practices style guide and tips
PPTX
Less presentation
PDF
Responsive Design in Drupal with Zen and Zen Grids
PDF
A Custom Drupal Theme in 40 Minutes
Html:css crash course (4:5)
快速开发Css
Week01 jan19 introductionto_php
Web programming css
.Less - CSS done right
Building a WordPress theme
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Module 3 - Intro to Bootstrap
Developing Your Ultimate Package
Advanced Wordpress
CSS Best practice
Xhtml and html5 basics
Open Source CMS Playroom
Start using less css
Css best practices style guide and tips
Less presentation
Responsive Design in Drupal with Zen and Zen Grids
A Custom Drupal Theme in 40 Minutes
Ad

Similar to The web context (20)

PDF
Intro to HTML 5 / CSS 3
PPTX
Web development it slideWeb development it slidemy web development slide-...
PPT
Introduction to Web Technology and Web Page Development
ODP
Light introduction to HTML
PPTX
Web Designing Training in Ambala ! BATRA COMPUTER CENTRE
PPTX
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
PDF
Html5 training
PDF
Club website demo
PPTX
mst_unit1.pptx
PPTX
Html workshop 1
PPTX
Intermediate Web Design
PPT
Introduction css
PPT
Introduction css
PPTX
Website/Web Applications / Static vs Dynamic Website / Web Browser /
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
PDF
HTML5, just another presentation :)
PPTX
Introduction to web designing
ZIP
Html5 public
PDF
Intro to HTML 5 / CSS 3
Web development it slideWeb development it slidemy web development slide-...
Introduction to Web Technology and Web Page Development
Light introduction to HTML
Web Designing Training in Ambala ! BATRA COMPUTER CENTRE
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Html5 training
Club website demo
mst_unit1.pptx
Html workshop 1
Intermediate Web Design
Introduction css
Introduction css
Website/Web Applications / Static vs Dynamic Website / Web Browser /
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
HTML5, just another presentation :)
Introduction to web designing
Html5 public
Ad

More from Dan Phiffer (7)

PDF
Occupy.here
PDF
Intro to JavaScript
PDF
Static layouts with css
PDF
Word press templates
PDF
Intro to word press
PDF
Diving into php
PDF
Web tech 101
Occupy.here
Intro to JavaScript
Static layouts with css
Word press templates
Intro to word press
Diving into php
Web tech 101

Recently uploaded (20)

PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PDF
Open folder Downloads.pdf yes yes ges yes
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
The Final Stretch: How to Release a Game and Not Die in the Process.
Open folder Downloads.pdf yes yes ges yes
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Week 4 Term 3 Study Techniques revisited.pptx
How to Manage Starshipit in Odoo 18 - Odoo Slides
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O7-L3 Supply Chain Operations - ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
Renaissance Architecture: A Journey from Faith to Humanism

The web context

  • 1. The web context Fast, Easy, Complicated, and Powerful Web ITP, Spring 2011, section 1, session 1 Dan Phiffer [email protected]
  • 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
  • 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