WT Unit 1 Ppts Web Development Process
WT Unit 1 Ppts Web Development Process
WT Unit 1 Ppts Web Development Process
“Web Development
Process, Front End Tools”
By
Prof. Anand N. Gharu
(Assistant Professor)
PVGCOE Computer Dept.
Note: The material to prepare this presentation has been taken from internet and are generated only
Introduction to JSON.
Web Technology
• The methods by which computers communicate with
each other through the use of markup languages and
multimedia packages is known as web technology.
Web Technologies
HTML SQL
XHTML ASP
CSS ADO
XML PHP
JavaScript .NET
VBSCRIPT SMIL
DOM SVG
DHTML FLASH
AJAX Java applets
E4X Java servlets
WMLScript Java Server Page
Internet and WWW
• Inter-network and World Wide Web
• Interlinked hypertext documents accessed using HTTP
Protocol
• Client - Server architecture
What is Internet?
• protocol://hostname/other_information
• The protocol is followed by a colon, two slashes, and then the
domain name. The domain name is the computer on which
the resource is located.
What is Website?
• which is a collection of various pages written in HTML
markup language.
• Netscape Navigator,
• Mozilla Firefox.
What is ISP?
• ISP stands for Internet Service Provider. They are the
companies who provide you service in terms of internet
connection to connect to the internet.
• You will buy space on a Web Server from any Internet Service
Provider. This space will be used to host your Website.
• Reliance
• Airtel
• BSNL
List of Technologies
• Client Side Technologies
• HTML, CSS, JavaScript, VBScript
• XHTML, DHTML, WML, AJAX
• FLASH
• Availability of technology?
• .biz −Answer extension on the Internet and can be used to indicate that this
site is purely related to business.
Website Designing steps
• Information
Gathering
• Planning
• Design
• Development
• Maintenance
Website Planning
• Set goals and objectives.
• Create a budget
• Create mock-up
• Start designing
• Test it out
Introduction to JSON.
HTML Basics
How the Web Works?
• WWW use classical client / server architecture
• HTTPis text-based request-response protocol
25
HTTP
Page request
HTTP
Server response
33
</head>
<body>
<p>This i s some t e x t . . . < / p >
</body>
</html>
First HTML Page: Tags
<!DOCTYPE HTML>
<html> Opening tag
<head>
34
< ti t l e>My Fi r st HTML Page</ t i t l e>
</head>
<body> Closing tag
<p>This i s some t e x t . . . < / p >
</body>
</html>
An HTML element consists of an opening tag, a closing tag and the content inside.
First HTML Page: Header
<!DOCTYPE HTML>
HTML header
<html>
<head>
35
< ti t l e>My Fi r st HTML Page</ t i t l e>
</head>
<body>
<p>This i s some t e x t . . . < / p >
</body>
</html>
First HTML Page: Body
<!DOCTYPE HTML>
<html>
<head>
36
< ti t l e>My Fi r st HTML Page</ t i t l e>
</head>
<body>
<p>This i s some t e x t . . . < / p >
</body>
</html>
HTML body
HTML Headings-
HTMLheadings are defined with the <h1> to <h6> tags. <h1> defines the
most important heading.<h6>defines the least important heading:
38
<h3>Sub heading 3</h3>
• Paragraph Tags
<p>This i s my f i r s t paragraph</p>
<p>This i s my second paragr aph</p>
<b></b> bold
<i></i> italicized
<u></u> underlined
<sup></sup> Samplesuperscript
<sub></sub> Samplesubscript
<strong></strong> strong
<em></em> emphasized
<pre></pre> Preformatted text
<blockquote></blockquote> Quoted text block
<del></del> Deleted text – strike through
39
Text Formatting Example
HTML Code Output
Hyperlinks: <a> Tag
• Link to a document called form.html on the same server in the
same directory:
<a href="form.html">Fill Our Form</a>
• Link to a document called parent.html on the same server in the
41
parent directory:
42
<a href="#section2.1 " >Project History</a><br / >
. . . t h e rest of the table of contents...
< ! - - The document t e x t follows here - - >
<h2 id="section1">Introduction</h2>
... Section 1 follows here . . .
<h2 id="section2">Some background</h2>
... Section 2 follows here . . .
<h3 id="section2.1">Project History</h3>
... Section 2.1 follows here . . .
Images: <img> tag
Inserting an image with <img> tag:
<img src="/img/basd-logo.png">
Image attributes:
src Location of image file (relative or absolute)
alt Substitute text for display (e.g. in text mode)
height Number of pixels of the height
width Number of pixels of the width
border Size of border, 0 for no border
Example:
<img s r c = " . / php.png" a l t ="PHP Logo" / >
43
Ordered Lists: <ol> Tag
• Create an Ordered List using <ol></ol>:
<ol type="1" >
<li>Apple</li>
<li>Orange</li>
<li>Grapefruit</li>
44
</ol>
45
• Attribute values for type are:
• disc, c i r c l e or square
46
<dl>
<dt>HTML</dt>
<dd>A markup language …</dd>
<dt>CSS</dt>
<dd>Language used to …</dd>
</dl>
• Renders without bullets
• Definition is indented
Lists – Example
<ol type="1">
lists.html
<li>Apple</li>
<li>Orange</li>
<li>Grapefruit</li>
</ol>
47
<ul type="disc">
<li>Apple</li>
<li>Orange</li>
<li>Grapefruit</li>
</ul>
<dl>
<dt>HTML</dt>
<dd>A markup lang…</dd>
</dl>
HTML Tables
HTML Table Tags
Tag Description
<table> Defines a table
<th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell in a table
<caption> Defines a table caption
Specifies a group of one or more columns in a table for
<colgroup>
formatting
Specifies column properties for each column within a
<col>
<colgroup> element
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in atable
HTML Tables (2)
• Start and end of a table
<table> . . . </table>
• Start and end of a row
50
<tr> . . . < / t r >
• Start and end of a cell in arow
<td> . . . </td>
Simple HTML Tables – Example
<html>
<body>
51
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
</table>
</body>
</html>
Simple HTML Tables – Example
<html>
<body>
52
<th colspan=2>Firstname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
</table>
</body>
</html>
Column and Row Span
• Table cells have two important attributes:
colspan rowspan
53
cell[1,1] cell[1,2] cell[1,2]
cell[1,1]
cell[2,1] cell[2,1]
colspan="2" rowspan="1"
Defines how Defines how
many columns many rows the
the cell occupies cell occupies
HTML Tables – colspan Example
<html>
<body>
54
<th colspan=2>Firstname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
</table>
</body>
</html>
HTML Tables – rowspan Example
<h2 align=center> Cell that spans two rows: </h2>
<table style="width:50%“ border=“1” align=center>
<tr>
<th>Name:</th>
<td>Bill Gates</td>
55
</tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>55577854</td>
</tr>
<tr>
<td>55577855</td>
</tr>
</table>
</body>
</html>
HTML Tables – rowspan
Example with <style>
Complete HTML Tables
• Table rows split into three semantic sections: header, body
and footer
• <thead> denotes table header and contains <th> elements,
instead of <td> elements
57
• <tbody> denotes collection of table rows that contain the very
data
• < t f o o t> denotes table footer but comes BEFOREthe <tbody>
tag
• <colgroup> and <col> define columns (most often used to set
column widths)
HTML Forms
Entering User Data from a Web Page
HTML Form
• The <form> Element
• The HTML <form> element defines a form that is used to
collect user input:
• Syntax
<form>
form elements
</form>
• Example
Input Type Password
• <input type="password"> • This is how the HTML
• defines a password field: code above will be
displayed in a browser:
• Example
Input Type Submit
• defines a button for submitting form data to a form-handler.
• The form-handler is specified in the form's actionattribute:
• Example
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="Mickey"> <br>
Last name:<br>
• Example
Input Type Button
72
<option value="BS">Bachelor of Science</option>
<option value="MBA" selected="selected">Master of
Business Administration</option>
</select>
<br / >
<label for="studentid">Student ID</label>
<input type="password" name="studentid" / >
< / fi eld set>
<fieldset><legend>Personal Details</legend>
<label for="fname">First Name</label>
<input type="text" name="fname" id="fname" / >
<br / >
<label for="lname">Last Name</label>
<input type="text" name="lname" id="lname" / >
HTML Forms – Example (2)
form.html (continued)
<br / >
Gender:
<input name="gender" type="radio" id="gm" value="m" / >
<label for="gm">Male</label>
<input name="gender" type="radio" id="gf" value="f" / >
73
<label for="gf">Female</label>
<br / >
<label for="email">Email</label>
<input type="text" name="email" id="email" / >
< / fi eld set>
<p>
<textarea name="terms" cols="30" rows="4"
readonly="readonly">TERMS ANDCONDITIONS...</textarea>
</p>
<p>
<input type="submit" name="submit" value="Send Form" / >
<input type="reset" value="Clear Form" / >
</p>
</form>
HTML Forms – Example (3)
form.html (continued)
74
HTML Frames
<frameset>, <frame> and <iframe>
HTML Frames
• Frames provide a way to show multiple HTML documents in a
single Web page
• The page can be split into separate views (frames) horizontally
and vertically
76
• Frames were popular in the early ages of HTMLdevelopment,
but now their usage is rejected
• Frames are not supported by all user agents (browsers, search
engines, etc.)
• A <noframes> element is used to provide content for non-
compatible agents.
HTML <frame> Tag.
• Example
• A simple three-framed page:
• <frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
Introduction to JSON.
Outline
Introduction to web technology, internet and www, Web site planning and
design issues,
Introduction to JSON.
Cascading Style Sheets (CSS)
Introduction of CSS
• Cascading Style Sheets, fondly referred to as CSS, is a simple
design language intended to simplify the process of making web
pages presentable.
• Using CSS, you can control the color of the text, the style of fonts,
the spacing between paragraphs, how columns are sized and laid out,
what background images or colors are used, layout
designs,variations in display for different devices and screen sizes as
well as a variety of other effects.
Advantages of CSS
• CSSsaves time
• Pages load faster
• Easy maintenance
• Superior styles to HTML
• Multiple Device
Compatibility
• Global web standards
• Offline Browsing
• Platform Independence
CSS3 Modules
• Selectors
• Box Model
• Text Effects
• 2D/3D Transformations
• Animations
• User Interface
CSS - Syntax
• A CSS comprises of style rules that are interpreted by the browser and then
applied to the corresponding elementsin your document.
• Property - A property is a type of attribute of HTML tag. Put simply, all the
HTML attributes are converted into CSS properties. They could be color,
border etc.
Output
CSS selectors (2)
• The id Selector
• The style rule below will be applied to the HTML elementwith id="para1":
• Example
• #para1 {
text-align: center; color: red;
}
Example with output
Output
CSS selectors (3)
• The class Selector
• Example
• .center {
text-align: center;
color: red;
}
Example with output
HTML Code with CSS
Output
CSS selectors (4)
• The classSelector continued….
• You can also specify that only specific HTML elements should be affected by a
class.
• In the example below, only <p> elements with class="center" will be center-
aligned:
• Example
• p.center {
text-align: center; color: red;
}
CSS selectors (5)
• Grouping Selectors
• If you have elements with the same style definitions, like this:
• h1 {
text-align: center;
color: red;}
h2 {
text-align: center;
color: red; }
p{
text-align: center;
color: red;}
• It will be better to group the selectors, to minimize the code.
• h1, h2, p {
text-align: center;
color: red;
Example with output
HTML Code with CSS
Output
Insert CSS in HTML
• Three Ways to Insert CSS
1. External style sheet
2. Internal style sheet
3. Inline style
External Style Sheet
• With an external style sheet, you can change the look of an
entire website by changing just one file!
• Example
• <head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
External Style Sheet - Example
HTML Code
• Internal styles are defined within the <style> element, inside the
<head> section of an HTMLpage:
• Example
Inline Styles
• An inline style may be used to apply a unique style for asingle element.
• The example below shows how to change the color and the left margin of a
<h1> element:
• Example
Text-related CSS Properties
• c o l o r – specifies the color of the text
• f o n t - s i z e – size of font: xx-small, x-small, small,
medium, large, x-large, xx-large, smaller, l a r g e r
or numeric value
10
1
• f o n t - f a m i l y – comma separated font names
• Example: verdana, s a n s - s e rif , etc.
• The browser loads the first one that is available
• There should always be at least one generic font
• f o n t - w e i g h t can be normal, bold, bolder, l i g h t e r
or a number in range [100 … 900]
CSS Rules for Fonts (2)
• f o n t - s t y l e – styles the font
• Values: normal, i t a l i c , oblique
10
2
• t e x t - d e c o r a t i o n – decorates the text
• Values: none, underline, l i n e - t r o u g h ,
overline, b l i n k
10
3
f o n t : i t a l i c normal bold 12px/16px verdana
10
4
• background-color
• Using color and image and the same time
• background-repeat
• repeat-x, repeat-y, repeat, no-repeat
• background-attachment
• fixed / s c r o l l
Backgrounds (2)
• background-position: specifies vertical and horizontal
position of the background image
• Vertical position: top, center, bottom
•
10
Horizontal position: l e f t , center, r i g h t
5
• Both can be specified in percentage or other numerical values
• Examples:
10
6
• border-color: color alias or RGB value
• border-top-style, b o r d e r- l ef t - c ol or, …
Border Shorthand Property
• border: shorthand rule for setting border properties at once:
border: 1px solid red
10
7
is equal to writing:
border-width:1px;
border-color:red;
border- st yle :sol i d;
10
8
e.g. 100px
XML: Introduction to XML, XML key component, Transforming XML into XSLT,
Introduction to JSON.
XML
• Introduction to XML
• What is XML?
• XML stores data in plain text format. This provides a software- and
hardware-independent way of storing, transporting, and sharing data.
• Save the file with .xml extension and when run o/p is like below
XMLExample 2- Books.xml
• <?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</bookstore>
XMLExample 2- Books.xml
explanation
• XML uses a much self-describing syntax.
• A prolog defines the XML version and the character encoding:
• <?xml version="1.0" encoding="UTF-8"?>
• The next line is the root element of the document:
• <bookstore>
• The next line starts a <book> element:
• <book category="cooking">
• The <book> elements have 4 child elements: <title>,
<author>, <year>, <price>.
• The next line ends the book element:
• </book>
XSLT
• XSLT(eXtensible Stylesheet Language Transformations) is the
recommended style sheet language for XML.
• XSLTis far more sophisticated than CSS.
• With XSLTyou can add/remove elements and attributes to or
from the output file.
• You can also rearrange and sort elements, perform tests and
make decisions about which elements to hide and display,and
a lot more.
• XSLTuses XPath to find information in an XMLdocument.
Displaying XMLwith XSLT
<xsl:for-each select="class/student">
<tr>
<td><xsl:value-of select = "@rollno"/></td>
<td><xsl:value-of select = "firstname"/></td>
<td><xsl:value-of select = "lastname"/></td>
</tr>
</xsl:for-each> </table>
</body> </html>
</xsl:template>
</xsl:stylesheet>
Step 3: Link the XSLTDocument to
the XMLDocument (.xml file)
• <?xml version = "1.0"?>
• <?xml-stylesheet type = "text/xsl" href = "students.xsl"?>
• <class>
<student rollno = "393">
<firstname>Dinkar</firstname>
<lastname>Kad</lastname>
</student>
<student rollno = "493">
<firstname>Vaneet</firstname>
<lastname>Gupta</lastname>
</student
• </class>
Step 4: View the XMLDocumentin
Internet Explorer
<?xml version = "1.0"?>
<?xml-stylesheet type = "text/xsl" href = "students.xsl"?>
<class>
<student rollno = "393">
<firstname>Dinkar</firstname>
<lastname>Kad</lastname>
</student>
<student rollno = "493">
<firstname>Vaneet</firstname>
<lastname>Gupta</lastname>
</student>
</class>
Output
Outline
Introduction to web technology, internet and www, Web site planning and
design issues,
Introduction to JSON.
Introduction to DTD
• A DTD is a Document Type Definition.
• A DTD defines the structure and the legal elements
and attributes of an XML document.
• With a DTD, independent groups of people can agree
on a standard DTD for interchanging data.
• An application can use a DTD to verify that XML data is
valid.
An Internal DTDExample
• <?xml version="1.0"?>
<!DOCTYPEnote [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note>
An Internal DTDExpalnation
• The DTDin previous slide is interpreted likethis:
• Example
• <name>Tutorials Point</name>
Attributes
• Attributes are part of the XMLelements.
• An element can have any number of unique attributes.
• Attributes give more information about the XML element or
more precisely it defines a property of the element.
• An XML attribute is always a name-value pair.
• Example
• <img src="flower.jpg"/>
• Here img is the element name whereas src is an attribute
name and flower.jpg is a value given for the attribute src.
Entities
• Entities are placeholders in XML. These can be declared in the
document prolog or in a DTD. Entities can be primarily categorized as:
• Built-in entities
• Character entities
• General entities
• Parameter entities
• There are five built-in entities that play in well-formed XML, they are:
• ampersand: &
• Single quote: '
• Greater than: >
• Less than: <
• Double quote: "
Advantages & Disadvantages
• Advantages of using DTD
• Documentation - You can define your own format for the XML
files.
• Validation - It gives a way to check the validity of XML files by
checking whether the elements appear in the right order,
mandatory elements and attributes are in place
Introduction to JSON.
JSON-Introduction
• JSON: JavaScript Object Notation.
• JSONis a syntax for storing and exchanging data.
• JSONis text, written with JavaScript object notation.
• JSONis language independent *
• Why use JSON?
• Since the JSON format is text only, it can easily be sent to and
from a server, and used as a data format by any programming
language.
• JavaScript has a built in function to convert a string, written in
JSONformat, into native JavaScriptobjects:
• JSON.parse()
• So, if you receive data from a server, in JSON format, you can
use it like any other JavaScriptobject.
JSONSyntax Rules
• JSONsyntax is derived from JavaScript object notation syntax:
• Data is in name/value pairs
• Data is separated by commas
• Curly braces hold objects
• Square brackets hold arrays
• JSONData - AName and a Value
• JSONdata is written as name/value pairs.
• A name/value pair consists of a field name (in double quotes),
followed by a colon, followed by a value:
• Example
• "name":"John"
JSONValues
• In JSON, values must be one of the following data types:
• a string
• a number
• an object (JSON object)
• an array
• a boolean
• null
• In JSON, string values must be written with double quotes:
• { "name":"John" }
Object Syntax
• Example
• { "name":"John", "age":30, "car":null }
• JSONobjects are surrounded by curly braces {}.
• JSONobjects are written in key/value pairs.
• Keys must be strings, and values must be a valid JSON data
type (string, number, object, array, boolean or null).
• Keys and values are separated by a colon.
• Each key/value pair is separated by a comma.
References
• http://study.com/academy/lesson/what-is-web-technology-
definition-trends.html
• https://www.tutorialspoint.com/web_developers_guide/web_
basic_concepts.htm
• https://www.slideshare.net/vikramsingh.v85/introduction-to-
web-technology
• www.telerik.com
• https://www.w3schools.com/html/
• https://www.w3schools.com/css/css_intro.asp
• https://www.w3schools.com/xml/
• https://www.w3schools.com/js/js_json_intro.asp
• https://www.w3schools.com/xml/xml_dtd_intro.asp