SlideShare a Scribd company logo
1 of 26
Made by –Chetan
(b120020079)
 A static website is a group of self-
contained, individual pages (or page),
sent to the browser from the server one-
page-at-a-time.
 Dynamic web content is built when it is
requested, by the user directly, or
programmatically while a user is on a
page (e.g., facebook updates).
 Most websites contain both static and
dynamic elements.
 HTML is a markup language
for describing web documents (web pages).
 HTML stands
for Hyper Text Markup Language
 A markup language is a set of markup tags
 HTML documents are described by HTML tags
 Each HTML tag describes different document
content
<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>
<tag>Content</tag>
Tags normally come in pairs. The first tag is the start
tag, and the second tag is the end tag.
 A stylesheet is a set of rules defining how an
html element will be “presented” in the
browser.
 These rules are targeted to specific elements
in the html document.
 The “cascade” part of CSS is a set of rules
for resolving conflicts with multiple CSS rules
applied to the same elements.
 For example, if there are two rules defining
the color or your h1 elements, the rule that
comes last in the cascade order will“trump”
the other.
 Every style is defined by a selector and a
declaration. The declaration contains at least one
property/value pair. Together they are called a CSS
Rule.
 CSS comes in three types:
 In a separate file (external). They are written as
shown<link href=“name.css” type=“text/css”>
under head tag.
 At the top of a web page document (internal).They
are placed inside the head tag section under the
style tag.
 Right next to the text it decorates (inline). It is
defined by using style attribute.
Priority order of CSS
Inline> Internal>External
 body {declaration}
 p {declaration}
 h1 {declaration}
 ul {declaration}
The simplest selector is the type selector,
which targets an html element by name.
 CSS
#logo {declaration}
 HTML
<img id=”logo” src=”” alt=””>
An ID is an html attribute that is added to your
html markup. You reference that ID in your css
with a hash.
 CSS
.ingredients {declaration}
 HTML
<ul class=”ingredients”>
A class is an html attribute that is added to
your
html markup. You reference that ID in your css
with a period.
 The most important difference between IDs
and classes is that there can be only one ID
on a page, but multiple classes.
 An ID is more specific than a class.
 An element can have both an ID and multiple
classes.
 JavaScript was designed to add interactivity to
HTML pages
 JavaScript is a scripting language (a scripting
language is a lightweight programming language)
 A JavaScript consists of lines of executable
computer code
 A JavaScript is usually embedded directly into
HTML pages
 JavaScript is an interpreted language (means
that scripts execute without preliminary
compilation)
 Everyone can use JavaScript without purchasing
a license
 Requires the JDK to
create the applet
 Requires a Java virtual
machine to run the
applet
 Applet files are distinct
from the XHTML code
 Source code is hidden
from the user
 Programs must be saved
as separate files and
compiled before they
can be run
 Programs run on the
server side
 Requires a text editor
 Required a browser that
can interpret JavaScript
code
 JavaScript can be
placed within HTML and
XHTML
 Source code is made
accessible to the user
 Programs cannot write
content to the hard disk
 Programs run on the
client side
 JavaScript code is included within <script> tags:
 <script type="text/javascript">
document.write("<h1>Hello World!</h1>") ;
</script>
 JavaScript can be put in the <head> or in the <body> of an
HTML document
 JavaScript functions should be defined in the <head>
 This ensures that the function is loaded before it is
needed
 JavaScript in the <body> will be executed as the page loads
 JavaScript can be put in a separate .js file
 <script src="myJavaScriptFile.js"></script>
 Put this HTML wherever you would put the actual
JavaScript code
 An external .js file lets you use the same JavaScript on
multiple HTML pages
 Before you can use a variable in your program,
you need to declare a variable using the var
command or by assigning the variable a value.
 Any of the following commands is a legitimate
way of creating a variable named “Month”:
var Month;
var Month = “December”;
Month = “December”;
 <script type="text/javascript">
 <!–
 document.writeln("Hello, WWW");
 // -->
 </script>
 <noscript>
 Your browser does not support
JavaScript.
 </noscript>
 Display a message in a dialog box.
 The dialog box will block the browser
alert("Text to be displayed");
var answer = confirm("Are you sure?");
 Display a message in a dialog box with two buttons:
"OK" or "Cancel".
 confirm() returns true if the user click "OK".
Otherwise it returns false.
 Display a message and allow the user to enter a value
 The second argument is the "default value" to be
displayed in the input textfield.
 Without the default value, "undefined" is shown in the
input textfield.
 If the user click the "OK" button, prompt() returns the
value in the input textfield as a string.
 If the user click the "Cancel" button, prompt() returns
null.
prompt("What is your student id number?");
prompt("What is your name?”, "No name");
<script type="text/javascript">
alert("This is an Alert method");
confirm("Are you OK?");
prompt("What is your name?");
prompt("How old are you?","20");
</script>
 An event occurs as a result of some activity
 e.g.:
 A user clicks on a link in a page
 Page finished loaded
 Mouse cursor enter an area
 A preset amount of time elapses
 A form is being submitted
 Event Handler – a segment of codes (usually a
function) to be executed when an event occurs
 We can specify event handlers as attributes in the
HTML tags.
 The attribute names typically take the form
"onXXX" where XXX is the event name.
 e.g.:
<a href="…" onClick="alert('Bye')">Other
Website</a>
Event Handlers Triggered when
onChange The value of the text field, textarea, or a drop down list
is modified
onClick A link, an image or a form element is clicked once
onDblClick The element is double-clicked
onMouseDown The user presses the mouse button
onLoad A document or an image is loaded
onSubmit A user submits a form
onReset The form is reset
onUnLoad The user closes a document or a frame
onResize A form is resized by the user

More Related Content

What's hot

Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML BasicsShawn Calvert
 
Java script Learn Easy
Java script Learn Easy Java script Learn Easy
Java script Learn Easy prince Loffar
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
Java Script
Java ScriptJava Script
Java Scriptsiddaram
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Ayes Chinmay
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1Saif Ullah Dar
 
Web designing unit 4
Web designing unit 4Web designing unit 4
Web designing unit 4SURBHI SAROHA
 
FYBSC IT Web Programming Unit III Document Object
FYBSC IT Web Programming Unit III  Document ObjectFYBSC IT Web Programming Unit III  Document Object
FYBSC IT Web Programming Unit III Document ObjectArti Parab Academics
 
Html, CSS, Javascript, Jquery, Meteor應用
Html, CSS, Javascript, Jquery, Meteor應用Html, CSS, Javascript, Jquery, Meteor應用
Html, CSS, Javascript, Jquery, Meteor應用LearningTech
 
Java Script An Introduction By HWA
Java Script An Introduction By HWAJava Script An Introduction By HWA
Java Script An Introduction By HWAEmma Wood
 
JavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM ManipulationJavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM Manipulationborkweb
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7phuphax
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java scriptAVINASH KUMAR
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2borkweb
 

What's hot (20)

Javascript
JavascriptJavascript
Javascript
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
 
Javascript
JavascriptJavascript
Javascript
 
Java script Learn Easy
Java script Learn Easy Java script Learn Easy
Java script Learn Easy
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
Java Script
Java ScriptJava Script
Java Script
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM]
 
Java script
Java scriptJava script
Java script
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
Web designing unit 4
Web designing unit 4Web designing unit 4
Web designing unit 4
 
FYBSC IT Web Programming Unit III Document Object
FYBSC IT Web Programming Unit III  Document ObjectFYBSC IT Web Programming Unit III  Document Object
FYBSC IT Web Programming Unit III Document Object
 
Html, CSS, Javascript, Jquery, Meteor應用
Html, CSS, Javascript, Jquery, Meteor應用Html, CSS, Javascript, Jquery, Meteor應用
Html, CSS, Javascript, Jquery, Meteor應用
 
Java Script An Introduction By HWA
Java Script An Introduction By HWAJava Script An Introduction By HWA
Java Script An Introduction By HWA
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
JavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM ManipulationJavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM Manipulation
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java script
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
Java scripts
Java scriptsJava scripts
Java scripts
 

Similar to Presentation

Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students shafiq sangi
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2GDSCUniversitasMatan
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/jsKnoldus Inc.
 
Web development Training in Ambala ! Batra Computer Centre
Web development Training in Ambala ! Batra Computer CentreWeb development Training in Ambala ! Batra Computer Centre
Web development Training in Ambala ! Batra Computer Centrejatin batra
 
FYBSC IT Web Programming Unit III Javascript
FYBSC IT Web Programming Unit III JavascriptFYBSC IT Web Programming Unit III Javascript
FYBSC IT Web Programming Unit III JavascriptArti Parab Academics
 
JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationSoumen Santra
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Introduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and JavascriptIntroduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and JavascriptAgustinus Theodorus
 
Web engineering notes unit 3
Web engineering notes unit 3Web engineering notes unit 3
Web engineering notes unit 3inshu1890
 

Similar to Presentation (20)

Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Introduction to JavaScript Basics.
Introduction to JavaScript Basics.Introduction to JavaScript Basics.
Introduction to JavaScript Basics.
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Web programming
Web programmingWeb programming
Web programming
 
Web development Training in Ambala ! Batra Computer Centre
Web development Training in Ambala ! Batra Computer CentreWeb development Training in Ambala ! Batra Computer Centre
Web development Training in Ambala ! Batra Computer Centre
 
FYBSC IT Web Programming Unit III Javascript
FYBSC IT Web Programming Unit III JavascriptFYBSC IT Web Programming Unit III Javascript
FYBSC IT Web Programming Unit III Javascript
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
Html
HtmlHtml
Html
 
Lecture-15.pptx
Lecture-15.pptxLecture-15.pptx
Lecture-15.pptx
 
Javascript session 1
Javascript session 1Javascript session 1
Javascript session 1
 
FSJavaScript.ppt
FSJavaScript.pptFSJavaScript.ppt
FSJavaScript.ppt
 
JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & Implementation
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Overview of PHP and MYSQL
Overview of PHP and MYSQLOverview of PHP and MYSQL
Overview of PHP and MYSQL
 
Introduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and JavascriptIntroduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and Javascript
 
Html Guide
Html GuideHtml Guide
Html Guide
 
Web engineering notes unit 3
Web engineering notes unit 3Web engineering notes unit 3
Web engineering notes unit 3
 

Recently uploaded

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 

Presentation

  • 2.  A static website is a group of self- contained, individual pages (or page), sent to the browser from the server one- page-at-a-time.  Dynamic web content is built when it is requested, by the user directly, or programmatically while a user is on a page (e.g., facebook updates).  Most websites contain both static and dynamic elements.
  • 3.
  • 4.
  • 5.  HTML is a markup language for describing web documents (web pages).  HTML stands for Hyper Text Markup Language  A markup language is a set of markup tags  HTML documents are described by HTML tags  Each HTML tag describes different document content
  • 7. <tag>Content</tag> Tags normally come in pairs. The first tag is the start tag, and the second tag is the end tag.
  • 8.  A stylesheet is a set of rules defining how an html element will be “presented” in the browser.  These rules are targeted to specific elements in the html document.  The “cascade” part of CSS is a set of rules for resolving conflicts with multiple CSS rules applied to the same elements.  For example, if there are two rules defining the color or your h1 elements, the rule that comes last in the cascade order will“trump” the other.
  • 9.  Every style is defined by a selector and a declaration. The declaration contains at least one property/value pair. Together they are called a CSS Rule.
  • 10.  CSS comes in three types:  In a separate file (external). They are written as shown<link href=“name.css” type=“text/css”> under head tag.  At the top of a web page document (internal).They are placed inside the head tag section under the style tag.  Right next to the text it decorates (inline). It is defined by using style attribute. Priority order of CSS Inline> Internal>External
  • 11.
  • 12.  body {declaration}  p {declaration}  h1 {declaration}  ul {declaration} The simplest selector is the type selector, which targets an html element by name.
  • 13.  CSS #logo {declaration}  HTML <img id=”logo” src=”” alt=””> An ID is an html attribute that is added to your html markup. You reference that ID in your css with a hash.
  • 14.  CSS .ingredients {declaration}  HTML <ul class=”ingredients”> A class is an html attribute that is added to your html markup. You reference that ID in your css with a period.
  • 15.  The most important difference between IDs and classes is that there can be only one ID on a page, but multiple classes.  An ID is more specific than a class.  An element can have both an ID and multiple classes.
  • 16.  JavaScript was designed to add interactivity to HTML pages  JavaScript is a scripting language (a scripting language is a lightweight programming language)  A JavaScript consists of lines of executable computer code  A JavaScript is usually embedded directly into HTML pages  JavaScript is an interpreted language (means that scripts execute without preliminary compilation)  Everyone can use JavaScript without purchasing a license
  • 17.  Requires the JDK to create the applet  Requires a Java virtual machine to run the applet  Applet files are distinct from the XHTML code  Source code is hidden from the user  Programs must be saved as separate files and compiled before they can be run  Programs run on the server side  Requires a text editor  Required a browser that can interpret JavaScript code  JavaScript can be placed within HTML and XHTML  Source code is made accessible to the user  Programs cannot write content to the hard disk  Programs run on the client side
  • 18.  JavaScript code is included within <script> tags:  <script type="text/javascript"> document.write("<h1>Hello World!</h1>") ; </script>  JavaScript can be put in the <head> or in the <body> of an HTML document  JavaScript functions should be defined in the <head>  This ensures that the function is loaded before it is needed  JavaScript in the <body> will be executed as the page loads  JavaScript can be put in a separate .js file  <script src="myJavaScriptFile.js"></script>  Put this HTML wherever you would put the actual JavaScript code  An external .js file lets you use the same JavaScript on multiple HTML pages
  • 19.  Before you can use a variable in your program, you need to declare a variable using the var command or by assigning the variable a value.  Any of the following commands is a legitimate way of creating a variable named “Month”: var Month; var Month = “December”; Month = “December”;
  • 20.  <script type="text/javascript">  <!–  document.writeln("Hello, WWW");  // -->  </script>  <noscript>  Your browser does not support JavaScript.  </noscript>
  • 21.  Display a message in a dialog box.  The dialog box will block the browser alert("Text to be displayed"); var answer = confirm("Are you sure?");  Display a message in a dialog box with two buttons: "OK" or "Cancel".  confirm() returns true if the user click "OK". Otherwise it returns false.
  • 22.  Display a message and allow the user to enter a value  The second argument is the "default value" to be displayed in the input textfield.  Without the default value, "undefined" is shown in the input textfield.  If the user click the "OK" button, prompt() returns the value in the input textfield as a string.  If the user click the "Cancel" button, prompt() returns null. prompt("What is your student id number?"); prompt("What is your name?”, "No name");
  • 23. <script type="text/javascript"> alert("This is an Alert method"); confirm("Are you OK?"); prompt("What is your name?"); prompt("How old are you?","20"); </script>
  • 24.  An event occurs as a result of some activity  e.g.:  A user clicks on a link in a page  Page finished loaded  Mouse cursor enter an area  A preset amount of time elapses  A form is being submitted
  • 25.  Event Handler – a segment of codes (usually a function) to be executed when an event occurs  We can specify event handlers as attributes in the HTML tags.  The attribute names typically take the form "onXXX" where XXX is the event name.  e.g.: <a href="…" onClick="alert('Bye')">Other Website</a>
  • 26. Event Handlers Triggered when onChange The value of the text field, textarea, or a drop down list is modified onClick A link, an image or a form element is clicked once onDblClick The element is double-clicked onMouseDown The user presses the mouse button onLoad A document or an image is loaded onSubmit A user submits a form onReset The form is reset onUnLoad The user closes a document or a frame onResize A form is resized by the user