SlideShare a Scribd company logo
HTML5, CSS3AND JAVASCRIPT
pment
Slide 2
Objectives
At the end of this module, you will be able to:
 Importance of Web Development
 Web Designer Vs. Web Developer
 Front-end and Back-end Web Development
 HTML, CSS and JavaScript - An Overview
 JavaScript Frameworks - jQuery and AngularJS
 Advanced Web Development Topics
Importance of Web Development
Slide 3
 The Internet is ubiquitous
• Accessible through mobile and desktop
• Customers/users need to find you/your business
• Builds trust in your organization and improves your reputation
• Your website is your first round-the-clock sales person!
 The Website
• Creates first impression of your business
• Create it to suit the needs of your target audience
• Reflects your expertise and reputation
• Can bring business from any part of the world!
• Call to Action – Encourage the users to give you business
 You need Web Development skills to create a Website!
Web Designer Vs. Web Developer
Slide 4
 A Web Designer
• Designs the look and feel of a website (creative side of website)
• Decides the layout, fonts, color, images and overall branding
• Creates the visual mock-up of the website
• Rarely does the development of a website!
• A Right-brained (Creative) Person
 A Web Developer
• Brings the website mock-up to life on the Internet (development side of website)
• Develops the website and hosts on a web server
• Has Web Development Skills: HTML, CSS, JavaScript, PHP, Perl, Python, Java, Ruby
• A Left-brained (Logical) Person
 Gain Web Development skills to become a Web Developer!
Front End and Back End Web Development
Slide 5
 Front End Web Development
• Defined components on the page with HTML
• Make them look pleasing with CSS
• Enable interactivity with JavaScript
• Enhance productivity with use of frameworks
 Back End Web Development
• Create the page components and content dynamically on the web server
• Send the HTML + CSS + JavaScript to web browser (used by a human user)
• Generate pages by programming in Java, JavaScript, PHP, Perl, Python, Ruby
• Aim to achieve fast response times to end users
 Front End Web Development is the focus of this webinar!
HTML, CSS, and JavaScript – An Overview
 HTML
• Hypertext Markup Language
• Structure of Page
 JavaScript
• Interactivity with User
• Dynamic Updates in a Web Page
 CSS
• Cascading Style Sheets
• Presentation/Styling
Slide 6
Hypertext - Origins
 HyperText
• Text with references (hyperlinks) to other text
 “Hyper” - meaning
• Greek Origin: “over”, “beyond”
 First Idea
• Vannevar Bush, USA, in 1945
Slide 7
A Simple HTML5 Page
Slide 8
 Save the following code in a test.html file
<!DOCTYPE html>
<html>
<head>
<title>This is a Web Course</title>
</head>
<body>
<p>Welcome to HTML5, CSS3 and JavaScript!</p>
</body>
</html>
Hosting a Web Site
Slide 9
 A Web Site
• Serves one or more HTML Pages
Default Page: index.html, index.php
 Served / Hosted by a Web Server
• HTTP Web Server
httpd, apache2, Ngnix, inetmgr.exe - Internet Information Server (Microsoft’s)
• Web Application Server
Apache Tomcat (Open Source), IBM WebSphere (Licensed)
 Technologies
• HTML, HTTP, TCP/IP Protocols
• Operating Systems: Linux, Windows, MacOS
HTML Page
Slide 10
 HTML (Web) Page / Document
• User Interface for the Web (site or application)
• A plain text file – human readable
• Transported on HTTP - HyperText Transfer Protocol
 Page Types
• Static – ready-made pages with fixed page content
File Extension: .html, .htm
• Dynamic – generated on the fly with varying page content
Generated on the Web Server
Interspersed with JavaScript, PHP, JSP, ASP
File Extensions: .js, .php, .jsp, .asp, .aspx
CSS - Introduction
 Cascading Style Sheet
• Describes the look and formatting of a page
• Used for Changing Presentation and Styling
• Can apply to a mark-up language
 HTML, XHTML, XML, SVG
 Separates Content from Presentation
 Properties (Attributes) Styled
• Layout, Font (Typography), Color, Background
• Box Properties: Border, Margin, Padding
• Lists, Tables
Slide 11 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
CSS Syntax (Contd./-)
Slide 12 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Style Selector
• The HTML elements to which the Style rule should be applied
• It is a match expression
• Specified as:
 Element’s tag name
 h1, p, label - case insensitive
 Value of Element’s attribute
 id, class - Case Sensitive
 Element’s placement in the Document tree
 Child element is nested within Parent
 A Sibling element is at the same nesting level
CSS Syntax (Contd./-)
Slide 13 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 CSS Declaration Block
• List of Declarations
• Enclosed in curly braces { . . . }
• Declaration
 property : value(s) ;
• property and value(s) are pre-defined
• Property name is unique
• Property value – Specified in multiple formats
 keywords (words) or mnemonics (in combination with some symbols like: #, /)
 numerical, hexadecimal, or a combination
 some values may have units of measure
New CSS3 Selectors
 New CSS3 Structural Pseudo-Class Selectors
• E:first-of-type – Selects the first element of type E for its parent
li:first-of-type { color: red; }
• E:last-of-type - Selects the last element of type E for its parent
li:last-of-type { color: yellow; }
• E:only-child - Selects if E is only the child of its parent
li:only-child { color: blue; }
• E:nth-child(n) - Selects nth child of the element E
li:nth-child(3) { color: yellow; }
• E:nth-last-child(n) - Selects nth last child of the element E
li:nth-last-child(2) { color: red; }
Slide 14 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
CSS3 – 2D Transforms
Slide 15 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Transformation
• Change of position, shape and size of an element
 CSS3 Transforms
• 2-D: Two Dimensions
• 3-D: Three Dimensions (not covered in this course)
 Transform Operations
• move, scale, spin, stretch and turn elements
CSS3 – 2D Transforms (Contd./-)
Slide 16 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Specified with transform attribute
• Translation – Movement along X-axis and Y-axis
transform: translate( 50px, 100px );
• Rotation – in clock-wise direction
transform: rotate( 5deg );
• Scaling – increase/decrease size along width and height
transform: scale( 2, 2 );
• Skewing – tilting (turning) in X-axis and Y-axis directions
transform: skew( 10deg, 5deg);
CSS3 Transitions
Slide 17 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Changing from one style to another (on an event)
 CSS property on which the transition effect has to take place
 Time Duration over which transition has to take place (smoothly)
 Specified in seconds (s) or milliseconds (ms)
p { width: 100px; }
p:hover { width: 200px; transition: width 2s; }
 Transition starts on events
 Events: hover, active, checked, focus, enabled, disabled
 @media queries, and JavaScript
 Specify multiple transitions sets with a comma
p { width: 200px; height: 100px; }
p:hover {
width: 400px; height: 200px;
transition: width 2s, height 5s; }
JavaScript – An Introduction
 Mocha, later renamed as LiveScript - Developed by Netscape
 Based on ECMAScript 5.1 (Ver. 6.0 is finalized in mid 2015)
 LiveScript  JavaScript (due to Java popularity)
 Scripting Language for Web Browsers
• Dynamically Typed
• Interpreted by JavaScript Engine
 Can not Do (for Security Reasons)
• Unlimited reading/writing of files from client machine’s file system
• Writing to the files on the Server
• Can not close a window that was not opened by it
• Can not read from a web page served by another web server
 Microsoft’s version - JScript
Slide 18 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
Document Object Model (DOM) (Contd./-)
Slide 19 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Structure and Style of a Page, Access / Update Content
 DOM + JavaScript = Dynamic HTML (on client-side)
 What JavaScript can do with DOM?
 Change an HTML Element
 Change an attribute of an HTML Element
 Change the CSS style of an HTML Element
 Remove an existing HTML element or its attributes
 Add new a HTML Element or a new attribute to an Element
 React to an event associated with an HTML Element
 Create a new event listener and associate with an HTML Element
HTML DOM Methods
Slide 20 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 DOM Methods – Finding HTML Elements
• getElementById() Method
 Gets the HTML Element with specified ID
• getElementsByClassName() Method
 Gets the HTML Elements with specified class name
document.getElementsByClassName("middlePara")[0].innerHTML = "Welcome
to Edureka!";
document.getElementsByClassName("middlePara")[1].innerHTML = "This is
HTML5, CSS3 and JavaScript Course!";
• getElementsByTagName() method
 Gets the HTML Elements with specified element tag
document.getElementsByTagName("p")[0].innerHTML = "Welcome to
Edureka!";
document.getElementsByTagName("p")[1].innerHTML = "This is HTML5,
CSS3 and JavaScript Course!";
jQuery - Introduction
Slide 21 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 jQuery Core – a Cross-Platform JavaScript Library
• Simplifies client-side JavaScript scripting for a web page
• It is FREE and Open Source
• Used by about 6,000 most visited websites
• It uses the familiar HTML DOM model
 Latest Versions
• Version 1.11.3 - has support for IE 6/7/8
• Version 2.1.4 - has NO support for IE 6/7/8
• Development Version
 For use during development of the website
• Minified Version
 For use in production (live / online) use of website
jQuery - Introduction
Slide 22 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
 Why use jQuery?
• JavaScript Framework
• Separates HTML and JavaScript in a web page
• Eliminates cross-browser incompatibilities
• Simple/Short, Clean and Easy to read, write and understand
 What jQuery can do?
• Can Select Elements
 Has Selectors are similar to CSS Selectors
• Can Manipulate the Selected Elements
• Can Modify the Style of the Selected Elements
• Supports Events, Effects and Animations
• Supports JSON Parsing and Ajax (Asynchronous JavaScript + XML)
jQuery Basics
 Download the latest version
• From jquery.com website
 Reference it in HTML file
• Host it on your Web Server and Use it with <script> tag
<script src="jquery-2.1.3.js"></script>
• Point to a Public Web Server and Use it with <script> tag
 Google CDN Server (recommended) CDN – Content Delivery Network
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
</script>
 Microsoft CDN Server
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js">
</script>
 MaxCDN CDN Server (moved from MediaTemple, before that Amazon)
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
• Do not put the jQuery code in the <script> tag that loads jQuery library
Slide 24 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
AngularJS - Introduction
 Developed by Google
 Based on MVC Pattern – on Front-End (Browser) side
• Model – Sourcing and Managing Data
• Controller – Application Logic – Decides what/when to display
• View – Presentation of Data – How (Where) to display the data
 In AngularJS
• Model
 Represents current state of the application
 Stored in Object Properties
• View
 Displays the data in the Page’s DOM
• Controller
 Manages the relationship between the Model and the View (JavaScript Code)
• Data Binding Concept
 Map parts of UI to a JavaScript Object’s properties
 Sync between them happens automatically
Slide 24 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
Web Application
Architecture
.
Basics, Components, Design and Development
Web Application
Types of Software
Desktop Applications
Server Softwares
Plugins
Embedded Software
What is a Web Application?
Is Website a Web Application?
Popular Websites
Web Applications
Facebook – the Social Network
Pixlr – Image Creation, Photo Editing & Effects
Zamzar – Online File Conversion
Gmail – Webmail Clients
bit.ly – Short URL Services
WolframAlpha – Computational Knowledge Engine
probable components of a modern
Website
Components of a Website
Logo
Navigation
Search
Content
Images & Multimedia
Gallery & Slideshows
Blog
Contact Form
Registration form
Members only area
Downloadable files
Shopping cart
Lets list all probable components
of a Web App say Facebook
Components of a Web Application
Logo
Sign-up or Log in
Dashboard
Navigation
Notifications
Search features
Activity Log
Statistics
Various Forms
Settings
User Profiles
Reports
In a most simplified language a full fledged Web Applications
consist of three basic components
Architecture of a Web Application
GUI – Client Side
The user interface is always rendered on a browser
Popular browsers
Programming languages
HTML (renders actual content)
CSS (Beautifies the content)
Javascript (Add effects, interaction, alter content)
Web Server
Web servers are computers that deliver Web pages.
Web server has an IP address and most of the times a domain
name
Eg. http://www.webfanzine.com/index.html
Any computer can be turned into Web Server
Web Server
Programming languages
PHP
ASP.NET
JAVA
PERL
Python
Ruby on rails
Data Storage
Server side scripting language can communicate with
database
Common databases
MySQL
SQL (DB2 & Microsoft)
Microsoft Access
Oracle
Basic Web Application - Requirements
Local Web Server
A browser
Basic knowledge of HTML, CSS, Javascript, PHP and MySQL
Online Web Server to deploy the application
Basic Web App – Development
Idea – Decide what is the purpose of your web application
Wireframe – On paper or a rapid prototype
Create a dedicated folder for your app
Create separate folders for css, js, images etc
Create main file – name it index.php
Basic Web App – Development
The index.php file will be similar to HTML (.html) file,
difference being you can write PHP code inside that file
Follow basic structure of HTML file
After you write HTML for the content that will be displayed,
add CSS to each element as per the design
Basic Web App – Development
All CSS will go in separate file say main.css in CSS folder
Follow PHP syntax to do any kind of computation or server
side validation.
In order to fetch or save data to database
Connect to MySQL database
Fetch the data in PHP variables or save the data
Close the connection
You can display the fetched data by populating the HTML
elements with PHP variables
Basic Web App – Development
Save this folder (say firstapp) into proper (www) folder of your
local web server
You can open your application by opening url like
http://localhost/firstapp/ in your browser.
Let us check the actual mini app for the syntax

More Related Content

PDF
web development
PPTX
25444215.pptx
PPTX
WEB DEVELOPMENT.pptx
PPTX
web development
PPTX
025444215.pptx
PPTX
Introduction to HTML .pptx
PPTX
webdevelopment_6132030-lva1-app6891.pptx
PDF
Web Development with HTML5, CSS3 & JavaScript
web development
25444215.pptx
WEB DEVELOPMENT.pptx
web development
025444215.pptx
Introduction to HTML .pptx
webdevelopment_6132030-lva1-app6891.pptx
Web Development with HTML5, CSS3 & JavaScript

Similar to Introduction to HTML language Web design.pptx (20)

PDF
A Work Day Of A Web Developer
PPTX
Html,CSS & UI/UX design
PPTX
Curtin University Frontend Web Development
PDF
Build a game with javascript (may 21 atlanta)
PDF
Build a game with javascript (april 2017)
PDF
Html5 n css3
PPT
Overview of PHP and MYSQL
PDF
Advanced guide to develop ajax applications using dojo
PDF
GDG-USAR Tech winter break 2024 USAR.pdf
PPTX
HTML5 for ASP.NET Developers
PDF
Intro JavaScript
PPTX
Training presentation.pptx
PDF
Web component driven development
PDF
Stencil the time for vanilla web components has arrived
PPT
HTML5_elementos nuevos integrados ahora
PDF
PPTX
BITM3730 8-30.pptx
PPTX
BITM3730 8-30.pptx
PPTX
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
PDF
Comparisons of web languages
A Work Day Of A Web Developer
Html,CSS & UI/UX design
Curtin University Frontend Web Development
Build a game with javascript (may 21 atlanta)
Build a game with javascript (april 2017)
Html5 n css3
Overview of PHP and MYSQL
Advanced guide to develop ajax applications using dojo
GDG-USAR Tech winter break 2024 USAR.pdf
HTML5 for ASP.NET Developers
Intro JavaScript
Training presentation.pptx
Web component driven development
Stencil the time for vanilla web components has arrived
HTML5_elementos nuevos integrados ahora
BITM3730 8-30.pptx
BITM3730 8-30.pptx
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Comparisons of web languages
Ad

More from lekhacce (19)

PPTX
CSS Selectors in web design program.pptx
PPT
cascading style sheet in web design .ppt
PPTX
Introduction to Webdesign .pptx
PPTX
Informationa Retrieval Techniques .pptx.pptx
PPTX
Informationa Retrieval Techniques .pptx
PPTX
Information Retrieval slides_chap02.pptx
PPTX
Information Retrieval slides_chap01.pptx
PPT
Extended Markup Basic Introduction .ppt
PPT
modes-of-operation in cryptography. .ppt
PPTX
OLAP operations in Data warehousing.pptx
PPTX
HTML_TABLES,FORMS,FRAME markup lang.pptx
PPTX
javascript client side scripting la.pptx
PPSX
matlab-130408153714-phpapp02_lab123.ppsx
PPT
1_chapter one Java content materials.ppt
PPTX
Information RetrievalsT_I_materials.pptx
PDF
Information_Retrievals Unit_3_chap09.pdf
PDF
slides_chap02.pdf
PPTX
AES.pptx
PDF
slides_chap01.pdf
CSS Selectors in web design program.pptx
cascading style sheet in web design .ppt
Introduction to Webdesign .pptx
Informationa Retrieval Techniques .pptx.pptx
Informationa Retrieval Techniques .pptx
Information Retrieval slides_chap02.pptx
Information Retrieval slides_chap01.pptx
Extended Markup Basic Introduction .ppt
modes-of-operation in cryptography. .ppt
OLAP operations in Data warehousing.pptx
HTML_TABLES,FORMS,FRAME markup lang.pptx
javascript client side scripting la.pptx
matlab-130408153714-phpapp02_lab123.ppsx
1_chapter one Java content materials.ppt
Information RetrievalsT_I_materials.pptx
Information_Retrievals Unit_3_chap09.pdf
slides_chap02.pdf
AES.pptx
slides_chap01.pdf
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
web development for engineering and engineering
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Construction Project Organization Group 2.pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
PPT on Performance Review to get promotions
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
web development for engineering and engineering
Arduino robotics embedded978-1-4302-3184-4.pdf
Construction Project Organization Group 2.pptx
Digital Logic Computer Design lecture notes
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
Lesson 3_Tessellation.pptx finite Mathematics
bas. eng. economics group 4 presentation 1.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
UNIT 4 Total Quality Management .pptx
Operating System & Kernel Study Guide-1 - converted.pdf
PPT on Performance Review to get promotions
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Model Code of Practice - Construction Work - 21102022 .pdf

Introduction to HTML language Web design.pptx

  • 2. pment Slide 2 Objectives At the end of this module, you will be able to:  Importance of Web Development  Web Designer Vs. Web Developer  Front-end and Back-end Web Development  HTML, CSS and JavaScript - An Overview  JavaScript Frameworks - jQuery and AngularJS  Advanced Web Development Topics
  • 3. Importance of Web Development Slide 3  The Internet is ubiquitous • Accessible through mobile and desktop • Customers/users need to find you/your business • Builds trust in your organization and improves your reputation • Your website is your first round-the-clock sales person!  The Website • Creates first impression of your business • Create it to suit the needs of your target audience • Reflects your expertise and reputation • Can bring business from any part of the world! • Call to Action – Encourage the users to give you business  You need Web Development skills to create a Website!
  • 4. Web Designer Vs. Web Developer Slide 4  A Web Designer • Designs the look and feel of a website (creative side of website) • Decides the layout, fonts, color, images and overall branding • Creates the visual mock-up of the website • Rarely does the development of a website! • A Right-brained (Creative) Person  A Web Developer • Brings the website mock-up to life on the Internet (development side of website) • Develops the website and hosts on a web server • Has Web Development Skills: HTML, CSS, JavaScript, PHP, Perl, Python, Java, Ruby • A Left-brained (Logical) Person  Gain Web Development skills to become a Web Developer!
  • 5. Front End and Back End Web Development Slide 5  Front End Web Development • Defined components on the page with HTML • Make them look pleasing with CSS • Enable interactivity with JavaScript • Enhance productivity with use of frameworks  Back End Web Development • Create the page components and content dynamically on the web server • Send the HTML + CSS + JavaScript to web browser (used by a human user) • Generate pages by programming in Java, JavaScript, PHP, Perl, Python, Ruby • Aim to achieve fast response times to end users  Front End Web Development is the focus of this webinar!
  • 6. HTML, CSS, and JavaScript – An Overview  HTML • Hypertext Markup Language • Structure of Page  JavaScript • Interactivity with User • Dynamic Updates in a Web Page  CSS • Cascading Style Sheets • Presentation/Styling Slide 6
  • 7. Hypertext - Origins  HyperText • Text with references (hyperlinks) to other text  “Hyper” - meaning • Greek Origin: “over”, “beyond”  First Idea • Vannevar Bush, USA, in 1945 Slide 7
  • 8. A Simple HTML5 Page Slide 8  Save the following code in a test.html file <!DOCTYPE html> <html> <head> <title>This is a Web Course</title> </head> <body> <p>Welcome to HTML5, CSS3 and JavaScript!</p> </body> </html>
  • 9. Hosting a Web Site Slide 9  A Web Site • Serves one or more HTML Pages Default Page: index.html, index.php  Served / Hosted by a Web Server • HTTP Web Server httpd, apache2, Ngnix, inetmgr.exe - Internet Information Server (Microsoft’s) • Web Application Server Apache Tomcat (Open Source), IBM WebSphere (Licensed)  Technologies • HTML, HTTP, TCP/IP Protocols • Operating Systems: Linux, Windows, MacOS
  • 10. HTML Page Slide 10  HTML (Web) Page / Document • User Interface for the Web (site or application) • A plain text file – human readable • Transported on HTTP - HyperText Transfer Protocol  Page Types • Static – ready-made pages with fixed page content File Extension: .html, .htm • Dynamic – generated on the fly with varying page content Generated on the Web Server Interspersed with JavaScript, PHP, JSP, ASP File Extensions: .js, .php, .jsp, .asp, .aspx
  • 11. CSS - Introduction  Cascading Style Sheet • Describes the look and formatting of a page • Used for Changing Presentation and Styling • Can apply to a mark-up language  HTML, XHTML, XML, SVG  Separates Content from Presentation  Properties (Attributes) Styled • Layout, Font (Typography), Color, Background • Box Properties: Border, Margin, Padding • Lists, Tables Slide 11 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
  • 12. CSS Syntax (Contd./-) Slide 12 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Style Selector • The HTML elements to which the Style rule should be applied • It is a match expression • Specified as:  Element’s tag name  h1, p, label - case insensitive  Value of Element’s attribute  id, class - Case Sensitive  Element’s placement in the Document tree  Child element is nested within Parent  A Sibling element is at the same nesting level
  • 13. CSS Syntax (Contd./-) Slide 13 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  CSS Declaration Block • List of Declarations • Enclosed in curly braces { . . . } • Declaration  property : value(s) ; • property and value(s) are pre-defined • Property name is unique • Property value – Specified in multiple formats  keywords (words) or mnemonics (in combination with some symbols like: #, /)  numerical, hexadecimal, or a combination  some values may have units of measure
  • 14. New CSS3 Selectors  New CSS3 Structural Pseudo-Class Selectors • E:first-of-type – Selects the first element of type E for its parent li:first-of-type { color: red; } • E:last-of-type - Selects the last element of type E for its parent li:last-of-type { color: yellow; } • E:only-child - Selects if E is only the child of its parent li:only-child { color: blue; } • E:nth-child(n) - Selects nth child of the element E li:nth-child(3) { color: yellow; } • E:nth-last-child(n) - Selects nth last child of the element E li:nth-last-child(2) { color: red; } Slide 14 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
  • 15. CSS3 – 2D Transforms Slide 15 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Transformation • Change of position, shape and size of an element  CSS3 Transforms • 2-D: Two Dimensions • 3-D: Three Dimensions (not covered in this course)  Transform Operations • move, scale, spin, stretch and turn elements
  • 16. CSS3 – 2D Transforms (Contd./-) Slide 16 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Specified with transform attribute • Translation – Movement along X-axis and Y-axis transform: translate( 50px, 100px ); • Rotation – in clock-wise direction transform: rotate( 5deg ); • Scaling – increase/decrease size along width and height transform: scale( 2, 2 ); • Skewing – tilting (turning) in X-axis and Y-axis directions transform: skew( 10deg, 5deg);
  • 17. CSS3 Transitions Slide 17 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Changing from one style to another (on an event)  CSS property on which the transition effect has to take place  Time Duration over which transition has to take place (smoothly)  Specified in seconds (s) or milliseconds (ms) p { width: 100px; } p:hover { width: 200px; transition: width 2s; }  Transition starts on events  Events: hover, active, checked, focus, enabled, disabled  @media queries, and JavaScript  Specify multiple transitions sets with a comma p { width: 200px; height: 100px; } p:hover { width: 400px; height: 200px; transition: width 2s, height 5s; }
  • 18. JavaScript – An Introduction  Mocha, later renamed as LiveScript - Developed by Netscape  Based on ECMAScript 5.1 (Ver. 6.0 is finalized in mid 2015)  LiveScript  JavaScript (due to Java popularity)  Scripting Language for Web Browsers • Dynamically Typed • Interpreted by JavaScript Engine  Can not Do (for Security Reasons) • Unlimited reading/writing of files from client machine’s file system • Writing to the files on the Server • Can not close a window that was not opened by it • Can not read from a web page served by another web server  Microsoft’s version - JScript Slide 18 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
  • 19. Document Object Model (DOM) (Contd./-) Slide 19 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Structure and Style of a Page, Access / Update Content  DOM + JavaScript = Dynamic HTML (on client-side)  What JavaScript can do with DOM?  Change an HTML Element  Change an attribute of an HTML Element  Change the CSS style of an HTML Element  Remove an existing HTML element or its attributes  Add new a HTML Element or a new attribute to an Element  React to an event associated with an HTML Element  Create a new event listener and associate with an HTML Element
  • 20. HTML DOM Methods Slide 20 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  DOM Methods – Finding HTML Elements • getElementById() Method  Gets the HTML Element with specified ID • getElementsByClassName() Method  Gets the HTML Elements with specified class name document.getElementsByClassName("middlePara")[0].innerHTML = "Welcome to Edureka!"; document.getElementsByClassName("middlePara")[1].innerHTML = "This is HTML5, CSS3 and JavaScript Course!"; • getElementsByTagName() method  Gets the HTML Elements with specified element tag document.getElementsByTagName("p")[0].innerHTML = "Welcome to Edureka!"; document.getElementsByTagName("p")[1].innerHTML = "This is HTML5, CSS3 and JavaScript Course!";
  • 21. jQuery - Introduction Slide 21 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  jQuery Core – a Cross-Platform JavaScript Library • Simplifies client-side JavaScript scripting for a web page • It is FREE and Open Source • Used by about 6,000 most visited websites • It uses the familiar HTML DOM model  Latest Versions • Version 1.11.3 - has support for IE 6/7/8 • Version 2.1.4 - has NO support for IE 6/7/8 • Development Version  For use during development of the website • Minified Version  For use in production (live / online) use of website
  • 22. jQuery - Introduction Slide 22 © Copyright 2015 – Abheri Technologies Pvt. Ltd.  Why use jQuery? • JavaScript Framework • Separates HTML and JavaScript in a web page • Eliminates cross-browser incompatibilities • Simple/Short, Clean and Easy to read, write and understand  What jQuery can do? • Can Select Elements  Has Selectors are similar to CSS Selectors • Can Manipulate the Selected Elements • Can Modify the Style of the Selected Elements • Supports Events, Effects and Animations • Supports JSON Parsing and Ajax (Asynchronous JavaScript + XML)
  • 23. jQuery Basics  Download the latest version • From jquery.com website  Reference it in HTML file • Host it on your Web Server and Use it with <script> tag <script src="jquery-2.1.3.js"></script> • Point to a Public Web Server and Use it with <script> tag  Google CDN Server (recommended) CDN – Content Delivery Network <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>  Microsoft CDN Server <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"> </script>  MaxCDN CDN Server (moved from MediaTemple, before that Amazon) <script src="http://code.jquery.com/jquery-2.1.3.min.js"></script> • Do not put the jQuery code in the <script> tag that loads jQuery library Slide 24 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
  • 24. AngularJS - Introduction  Developed by Google  Based on MVC Pattern – on Front-End (Browser) side • Model – Sourcing and Managing Data • Controller – Application Logic – Decides what/when to display • View – Presentation of Data – How (Where) to display the data  In AngularJS • Model  Represents current state of the application  Stored in Object Properties • View  Displays the data in the Page’s DOM • Controller  Manages the relationship between the Model and the View (JavaScript Code) • Data Binding Concept  Map parts of UI to a JavaScript Object’s properties  Sync between them happens automatically Slide 24 © Copyright 2015 – Abheri Technologies Pvt. Ltd.
  • 26. Web Application Types of Software Desktop Applications Server Softwares Plugins Embedded Software What is a Web Application? Is Website a Web Application?
  • 29. Facebook – the Social Network Pixlr – Image Creation, Photo Editing & Effects Zamzar – Online File Conversion Gmail – Webmail Clients bit.ly – Short URL Services WolframAlpha – Computational Knowledge Engine
  • 30. probable components of a modern Website
  • 31. Components of a Website Logo Navigation Search Content Images & Multimedia Gallery & Slideshows Blog Contact Form Registration form Members only area Downloadable files Shopping cart
  • 32. Lets list all probable components of a Web App say Facebook
  • 33. Components of a Web Application Logo Sign-up or Log in Dashboard Navigation Notifications Search features Activity Log Statistics Various Forms Settings User Profiles Reports
  • 34. In a most simplified language a full fledged Web Applications consist of three basic components Architecture of a Web Application
  • 35. GUI – Client Side The user interface is always rendered on a browser Popular browsers Programming languages HTML (renders actual content) CSS (Beautifies the content) Javascript (Add effects, interaction, alter content)
  • 36. Web Server Web servers are computers that deliver Web pages. Web server has an IP address and most of the times a domain name Eg. http://www.webfanzine.com/index.html Any computer can be turned into Web Server
  • 38. Data Storage Server side scripting language can communicate with database Common databases MySQL SQL (DB2 & Microsoft) Microsoft Access Oracle
  • 39. Basic Web Application - Requirements Local Web Server A browser Basic knowledge of HTML, CSS, Javascript, PHP and MySQL Online Web Server to deploy the application
  • 40. Basic Web App – Development Idea – Decide what is the purpose of your web application Wireframe – On paper or a rapid prototype Create a dedicated folder for your app Create separate folders for css, js, images etc Create main file – name it index.php
  • 41. Basic Web App – Development The index.php file will be similar to HTML (.html) file, difference being you can write PHP code inside that file Follow basic structure of HTML file After you write HTML for the content that will be displayed, add CSS to each element as per the design
  • 42. Basic Web App – Development All CSS will go in separate file say main.css in CSS folder Follow PHP syntax to do any kind of computation or server side validation. In order to fetch or save data to database Connect to MySQL database Fetch the data in PHP variables or save the data Close the connection You can display the fetched data by populating the HTML elements with PHP variables
  • 43. Basic Web App – Development Save this folder (say firstapp) into proper (www) folder of your local web server You can open your application by opening url like http://localhost/firstapp/ in your browser. Let us check the actual mini app for the syntax