SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Web Programming Intro
             Ynon Perek




Saturday, December 15, 12
Whoami




                    Ynon Perek

                    http://ynonperek.com

                    ynon@ynonperek.com




Saturday, December 15, 12
Agenda



                    The Web Architecture

                    Hello HTML

                    Hello CSS

                    Hello JavaScript




Saturday, December 15, 12
The Web Architecture


        Client Side                             Server Side


                                   GET data




                                   Here It Is




Saturday, December 15, 12
Server Side


                    Server side creates the
                    data and returns it to
                    the client

                    All server-side
                    languages return the
                    same result: HTML

                    There are many
                    languages...




Saturday, December 15, 12
Client Side

                    Client side takes the
                    data and renders it on
                    screen

                    Provides a UX around
                    the data

                    Can send data back to
                    the server

                    Browsers: IE, Chrome,
                    Firefox, Safari




Saturday, December 15, 12
The Data



                    Data is in a format
                    called HTML (Hyper
                    Text Markup Language)

                    Invented by Tim
                    Berners-Lee




Saturday, December 15, 12
The Data


                                          <html>
                    A browser renders     <body>
                    HTML document on        <h1>Hello World</h1>
                                            <p>All your base are belong
                    screen
                                               to us</p>
                                          </body>
                    HTML is a tag-based
                                          </html>
                    language




Saturday, December 15, 12
The Data




                    Tag-based means you need to use
                    the same opening and closing tag




                            <div>How Do You Annoy A Web
                                 Developer ?</span>


Saturday, December 15, 12
Available Tags



                    Tags (or markup) define the role of their content

                    Headers:
                    h1, h2, h3, h4, h5, h6

                    Block Sections: div

                    Inline Sections: span




Saturday, December 15, 12
Container (Block)


             Demo
             Inline vs. Block
                                   One Two Three (inline)




Saturday, December 15, 12
Adding Links



                    Use <a> tag to create a link

                    <a> is an inline element

                    Example:

                    <a href=”http://google.com”>Go To Google</a>




Saturday, December 15, 12
Adding Images


                    Use <img> tag to create an image

                    <img> is an inline-block element: It flows it text, but
                    has height and width like a block

                    alt attribute tells google what’s in the photo

                    Example:
                    <img src=”http://fc02.deviantart.net/fs21/f/2007/306/
                    d/6/Chibi_turtle_by_blackcattlc.jpg” alt=”Cool Turtle”>




Saturday, December 15, 12
Adding Text




                    Use <p> tag to wrap text paragraphs

                    <p> is a block-level element

                    Adds a newline




Saturday, December 15, 12
Clickable Images




                    Wrap in <img> in an <a> tag to get an image that is
                    also a link

                    Demo: images, links and text paragraphs




Saturday, December 15, 12
Lists



                    HTML has two types of lists: ordered lists marked <ol>
                    and unordered lists marked <ul>

                    Inside a list block, use <li> to denote items

                    <ul>, <ol> and <li> are all block elements




Saturday, December 15, 12
Lab




                    Create an HTML document for your resume

                    Use correct headers

                    Add an image




Saturday, December 15, 12
Pages With Style
             Introducing CSS


Saturday, December 15, 12
Cascading Style Sheets




                    Apply styling rules to elements

                    Choose an element with a selector

                    Specify rules using properties




Saturday, December 15, 12
Let’s Start With The Basics



                    Select all h1 elements

                    Write text in red

                    h1 {
                      color: red;
                    }




Saturday, December 15, 12
Let’s Start With The Basics


                    More CSS styling properties:

                            background-color, color

                            font-weight, font-size, font-family, font-style, text-
                            decoration

                            text-align, line-height

                            outline




Saturday, December 15, 12
Let’s Start With The Basics


                    Use #id to find a specific HTML element

                    h2#main {
                      color: red;
                    }

                    And in HTML:
                    <h2 id=‘main’>Red</h2>




Saturday, December 15, 12
Let’s Start With The Basics


                    Use .class to find a set of HTML elements

                    h2.uppercase {
                      text-transform: uppercase;
                    }

                    And in HTML:
                    <h2 class=‘uppercase’>Red</h2>




Saturday, December 15, 12
Block Level Properties




                    Only block (or inline-block) elements have size

                    width and height are only applicable to block elements




Saturday, December 15, 12
Lab



                    Using the docs:
                    https://
                    developer.mozilla.org/
                    en-US/docs/CSS

                    Style this HTML:
                    http://pastebin.com/
                    Wm2s8EnH




Saturday, December 15, 12
Thank You



                    Photos From:

                            http://www.flickr.com/photos/
                            pedrosimoes7/5158386021/

                            http://123rf.com




Saturday, December 15, 12

Weitere ähnliche Inhalte

Was ist angesagt?

Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1
Mohammed Hussein
 

Was ist angesagt? (20)

Dynamic Web
Dynamic WebDynamic Web
Dynamic Web
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Operating system security
Operating system securityOperating system security
Operating system security
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Client & server side scripting
Client & server side scriptingClient & server side scripting
Client & server side scripting
 
Unit 1 introduction to web programming
Unit 1 introduction to web programmingUnit 1 introduction to web programming
Unit 1 introduction to web programming
 
Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1
 
Xml
XmlXml
Xml
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
 
uniform resource locator
uniform resource locatoruniform resource locator
uniform resource locator
 
CSS
CSSCSS
CSS
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Internet and its uses
Internet and its usesInternet and its uses
Internet and its uses
 
Html table tags
Html table tagsHtml table tags
Html table tags
 
Javascript
JavascriptJavascript
Javascript
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScript
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 

Ähnlich wie Introduction to Web Programming

Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
Ariya Hidayat
 
Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
Zach Leatherman
 
Ga london-html5&mobile advertising-tomlimongello
Ga london-html5&mobile advertising-tomlimongelloGa london-html5&mobile advertising-tomlimongello
Ga london-html5&mobile advertising-tomlimongello
Tom Limongello
 
Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_
Ken Collins
 

Ähnlich wie Introduction to Web Programming (20)

Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
 
An introduction to WordPress Development
An introduction to WordPress DevelopmentAn introduction to WordPress Development
An introduction to WordPress Development
 
RuHL
RuHLRuHL
RuHL
 
Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
 
05 Mobile CSS
05 Mobile CSS05 Mobile CSS
05 Mobile CSS
 
Artdm171 Week12 Hosting
Artdm171 Week12 HostingArtdm171 Week12 Hosting
Artdm171 Week12 Hosting
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM Manipulations
 
Web Programming Intro
Web Programming IntroWeb Programming Intro
Web Programming Intro
 
Web Performance & You
Web Performance & YouWeb Performance & You
Web Performance & You
 
Converting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 ThemeConverting (X)HTML/CSS template to Drupal 7 Theme
Converting (X)HTML/CSS template to Drupal 7 Theme
 
Modern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & StructureModern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & Structure
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
Fecc 12517-sd
Fecc 12517-sdFecc 12517-sd
Fecc 12517-sd
 
Fluentd and WebHDFS
Fluentd and WebHDFSFluentd and WebHDFS
Fluentd and WebHDFS
 
Hive sq lfor-hadoop
Hive sq lfor-hadoopHive sq lfor-hadoop
Hive sq lfor-hadoop
 
Adapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the futureAdapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the future
 
Ga london-html5&mobile advertising-tomlimongello
Ga london-html5&mobile advertising-tomlimongelloGa london-html5&mobile advertising-tomlimongello
Ga london-html5&mobile advertising-tomlimongello
 
Html 5 and css 3
Html 5 and css 3Html 5 and css 3
Html 5 and css 3
 
ID01 / W01
ID01 / W01ID01 / W01
ID01 / W01
 
Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_
 

Mehr von Ynon Perek

Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
Ynon Perek
 

Mehr von Ynon Perek (20)

Regexp
RegexpRegexp
Regexp
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
09 performance
09 performance09 performance
09 performance
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web Intro
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Vimperl
VimperlVimperl
Vimperl
 
Syllabus
SyllabusSyllabus
Syllabus
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
 
Network
NetworkNetwork
Network
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Cryptography
CryptographyCryptography
Cryptography
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScript
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Angularjs
AngularjsAngularjs
Angularjs
 
Js memory
Js memoryJs memory
Js memory
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 

Kürzlich hochgeladen

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

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Introduction to Web Programming

  • 1. Web Programming Intro Ynon Perek Saturday, December 15, 12
  • 2. Whoami Ynon Perek http://ynonperek.com ynon@ynonperek.com Saturday, December 15, 12
  • 3. Agenda The Web Architecture Hello HTML Hello CSS Hello JavaScript Saturday, December 15, 12
  • 4. The Web Architecture Client Side Server Side GET data Here It Is Saturday, December 15, 12
  • 5. Server Side Server side creates the data and returns it to the client All server-side languages return the same result: HTML There are many languages... Saturday, December 15, 12
  • 6. Client Side Client side takes the data and renders it on screen Provides a UX around the data Can send data back to the server Browsers: IE, Chrome, Firefox, Safari Saturday, December 15, 12
  • 7. The Data Data is in a format called HTML (Hyper Text Markup Language) Invented by Tim Berners-Lee Saturday, December 15, 12
  • 8. The Data <html> A browser renders <body> HTML document on   <h1>Hello World</h1>   <p>All your base are belong screen to us</p> </body> HTML is a tag-based </html> language Saturday, December 15, 12
  • 9. The Data Tag-based means you need to use the same opening and closing tag <div>How Do You Annoy A Web Developer ?</span> Saturday, December 15, 12
  • 10. Available Tags Tags (or markup) define the role of their content Headers: h1, h2, h3, h4, h5, h6 Block Sections: div Inline Sections: span Saturday, December 15, 12
  • 11. Container (Block) Demo Inline vs. Block One Two Three (inline) Saturday, December 15, 12
  • 12. Adding Links Use <a> tag to create a link <a> is an inline element Example: <a href=”http://google.com”>Go To Google</a> Saturday, December 15, 12
  • 13. Adding Images Use <img> tag to create an image <img> is an inline-block element: It flows it text, but has height and width like a block alt attribute tells google what’s in the photo Example: <img src=”http://fc02.deviantart.net/fs21/f/2007/306/ d/6/Chibi_turtle_by_blackcattlc.jpg” alt=”Cool Turtle”> Saturday, December 15, 12
  • 14. Adding Text Use <p> tag to wrap text paragraphs <p> is a block-level element Adds a newline Saturday, December 15, 12
  • 15. Clickable Images Wrap in <img> in an <a> tag to get an image that is also a link Demo: images, links and text paragraphs Saturday, December 15, 12
  • 16. Lists HTML has two types of lists: ordered lists marked <ol> and unordered lists marked <ul> Inside a list block, use <li> to denote items <ul>, <ol> and <li> are all block elements Saturday, December 15, 12
  • 17. Lab Create an HTML document for your resume Use correct headers Add an image Saturday, December 15, 12
  • 18. Pages With Style Introducing CSS Saturday, December 15, 12
  • 19. Cascading Style Sheets Apply styling rules to elements Choose an element with a selector Specify rules using properties Saturday, December 15, 12
  • 20. Let’s Start With The Basics Select all h1 elements Write text in red h1 { color: red; } Saturday, December 15, 12
  • 21. Let’s Start With The Basics More CSS styling properties: background-color, color font-weight, font-size, font-family, font-style, text- decoration text-align, line-height outline Saturday, December 15, 12
  • 22. Let’s Start With The Basics Use #id to find a specific HTML element h2#main { color: red; } And in HTML: <h2 id=‘main’>Red</h2> Saturday, December 15, 12
  • 23. Let’s Start With The Basics Use .class to find a set of HTML elements h2.uppercase { text-transform: uppercase; } And in HTML: <h2 class=‘uppercase’>Red</h2> Saturday, December 15, 12
  • 24. Block Level Properties Only block (or inline-block) elements have size width and height are only applicable to block elements Saturday, December 15, 12
  • 25. Lab Using the docs: https:// developer.mozilla.org/ en-US/docs/CSS Style this HTML: http://pastebin.com/ Wm2s8EnH Saturday, December 15, 12
  • 26. Thank You Photos From: http://www.flickr.com/photos/ pedrosimoes7/5158386021/ http://123rf.com Saturday, December 15, 12