SlideShare a Scribd company logo
Ayes Chinmay
Internet
&
Web Technology
(CSS and JavaScript)
IWT Syllabus:
Module 2:
Java Script
Scripting: Java script: Introduction, statements, comments, variables, operators, documents,
forms, functions, objects, events, Strings, Numbers, Arrays, Date, Math, Random, Loops,
Regxp, errors, this, Let, Const., classes, debugging .
The HTML DOM (Document Object Model)
Introduction, DOM Methods, DOM Document, DOM Elements , DOM HTML, DOM CSS,
DOM Events, DOM Navigation, DOM Nodes , DOM Nodelist
The Browser Object Model (BOM)
The Window Object, Window Size, Window History, Window Navigator, Browser Detection,
JavaScript Timing Events, Cookies, Working on Cookies using Java script.
CSS:
 CSS stands for Cascaded Style Sheet.
 Wium Lie has proposed the concept of CSS in 1994 (26 years ago).
 The latest version of CSS 3 was published in 1999. World Wide Web
Consortium (W3C) defines the specifications of CSS.
 Father of HTML 5, CSS 3 => “Håkon Wium Lie”Håkon Wium Lie
CSS Syntax:
Types of CSS:
1) External CSS
2) Internal CSS
3) Inline CSS
External CSS:
 With an external style sheet, you can change the look of an entire website by
changing just one file.
 Each HTML page must include a reference to the external style sheet file inside
the <link> element, inside the head section.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Internal CSS:
 An inline style may be used to apply a unique style for a single element.
 To use inline styles, add the style attribute to the relevant element. The
style attribute can contain any CSS property.
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: linen;}
h1 {color: maroon;
margin-left: 40px; }
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Inline CSS:
 An inline style may be used to apply a unique style for a single element.
 To use inline styles, add the style attribute to the relevant element. The
style attribute can contain any CSS property.
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;text-align:center;">
This is a heading
</h1>
<p style="color:red;">
This is a paragraph.
</p>
</body>
</html>
JavaScript:
 JavaScript enables interactive web pages and is an essential part of web
applications.
 First released in December 4, 1995 (24 years ago).
 JavaScript is the dominant client-side scripting language of the Web,
with 95% of websites using it for this purpose.
 All major web browsers have a built-in JavaScript engine that executes
the code on the user's device.
 "JavaScript" is a trademark of Oracle Corporation in the United States.
Brendan Eich
JavaScript Syntax:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Strings</h2>
<p>Strings can be written with double or single quotes.</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = 'John Doe';
</script>
</body>
</html>
JavaScript Function:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript in Body</h2>
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it</button>
<button type="button" onclick="myFunction1()">Try it1</button>
</body>
</html>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph
changed.";
}
function myFunction1() {
document.getElementById("demo").innerHTML = "Paragraph
changed1.";
}
</script>
JavaScript Random Function:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Math.random()</h2>
<p>Math.random() returns a random number between 0 (included) and 1
(excluded):</p>
<button onclick="check()"> Random </button>
<p id="demo"></p>
<script>
var a=10;
function check(){
document.getElementById("demo").innerHTML = a*Math.random();
}
</script>
</body>
</html>
JavaScript Array:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Arrays</h2>
<p>JavaScript array elements are accessed using numeric indexes
(starting from 0).</p>
<p id="demo"></p>
<script>
var cars = ["Saab", "Volvo", "BMW"];
document.getElementById("demo").innerHTML = cars[0];
</script>
</body>
</html>
JavaScript Regular Expression:
 A regular expression is a sequence of characters that forms a search pattern.
 The search pattern can be used for text search and text replace operations.
What Is a Regular Expression?
 A regular expression is a sequence of characters that forms a search pattern.
 When you search for data in a text, you can use this search pattern to describe
what you are searching for.
 A regular expression can be a single character, or a more complicated pattern.
 Regular expressions can be used to perform all types of text search and text
replace operations.
JavaScript replace() & search():
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Regular Expressions</h2>
<p>Replace "microsoft" with "W3Schools" in the paragraph below:</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">Please visit Microsoft and Microsoft!</p>
<script>
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var txt = str.replace(/microsoft/i,"W3Schools");
document.getElementById("demo").innerHTML = txt;
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Regular Expressions</h2>
<p>Search a string for "w3Schools", and display the position of the
match:</p>
<p id="demo"></p>
<script>
var str = "Visit W3Schools!";
var n = str.search(/w3Schools/i);
document.getElementById("demo").innerHTML = n;
</script>
</body>
</html>
Model Questions:
1. The correct syntax for adding yellow as a background
colour in HTML is:
(a) < body style="background-color:yellow">
(b) <backgroundcolor>yellow</background color>
(c) <color.background="yellow">
(d) <backgrndcolor="yellow">
2. The HTML tag used to make a text italic is
(a) <italic> (b) <i>
(c) <textitalic> (d) <slantingtext>
Model Questions: (Cont.)
3. The HTML tag used to define an internal style sheet is
(a) <style> (b) <stylesheet>
(c) <css> (d) <internal link>
4. JavaScript is defined under which HTML element?
(a) <jscript> (b) <script>
(c) <scriptjava> (d) <define.js>
5. Which of the following statements is used for creating
a function?
(a) function=Functionname()
(b) function Functionname()
(c) function:Functionname()
(d) function "Functionname"
Next Class:
HTML DOM

More Related Content

What's hot (20)

PPTX
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
PPTX
uptu web technology unit 2 html
Abhishek Kesharwani
 
PPT
Document Object Model
chomas kandar
 
PPT
Boostrap basics
JTechTown
 
PPTX
Html - By Auroskkil
BoneyGawande
 
PDF
CSS-3 Course Slide
BoneyGawande
 
PPTX
Hushang Gaikwad
Hushnag Gaikwad
 
PPTX
Dhtml
Sadhana28
 
PDF
Html css workshop, lesson 0, how browsers work
Albino Tonnina
 
PPTX
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
PPTX
Dynamic HTML (DHTML)
Himanshu Kumar
 
PPTX
Html & CSS
JainilSampat
 
PDF
HTML Lecture Part 1 of 2
Sharon Wasden
 
PPTX
uptu web technology unit 2 html
Abhishek Kesharwani
 
PPTX
How the Web Works Using HTML
Marlon Jamera
 
PDF
Html / CSS Presentation
Shawn Calvert
 
PDF
Basic Details of HTML and CSS.pdf
Kalyani Government Engineering College
 
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
uptu web technology unit 2 html
Abhishek Kesharwani
 
Document Object Model
chomas kandar
 
Boostrap basics
JTechTown
 
Html - By Auroskkil
BoneyGawande
 
CSS-3 Course Slide
BoneyGawande
 
Hushang Gaikwad
Hushnag Gaikwad
 
Dhtml
Sadhana28
 
Html css workshop, lesson 0, how browsers work
Albino Tonnina
 
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
Dynamic HTML (DHTML)
Himanshu Kumar
 
Html & CSS
JainilSampat
 
HTML Lecture Part 1 of 2
Sharon Wasden
 
uptu web technology unit 2 html
Abhishek Kesharwani
 
How the Web Works Using HTML
Marlon Jamera
 
Html / CSS Presentation
Shawn Calvert
 
Basic Details of HTML and CSS.pdf
Kalyani Government Engineering College
 

Similar to Internet and Web Technology (CLASS-4) [CSS & JS] (20)

PDF
Introduction to HTML and CSS
Mario Hernandez
 
PPT
A quick guide to Css and java script
AVINASH KUMAR
 
PPT
Overview of PHP and MYSQL
Deblina Chowdhury
 
PDF
Wt unit 2 ppts client side technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
PDF
Wt unit 2 ppts client sied technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
PDF
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 
KEY
Slow kinda sucks
Tim Wright
 
PPTX
WEB DEVELOPMENT
Gourav Kaushik
 
PDF
Web Design Bootcamp - Day1
Aslam Najeebdeen
 
PPTX
1812010023 web developement(ANKITA OJHA)CSE4(A).pptx
HarshJaiswal535013
 
PPTX
JavaScriptL18 [Autosaved].pptx
VivekBaghel30
 
PPT
Web performance essentials - Goodies
Jerry Emmanuel
 
PPTX
Web Development Fundamentals UNIT 1 & 2.pptx
GayathriPG3
 
PPTX
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Shane Church
 
PDF
HTML_CSS_JS Workshop
GDSC UofT Mississauga
 
PDF
GDG-USAR Tech winter break 2024 USAR.pdf
raiaryan174
 
PPTX
Introduction to Html5, css, Javascript and Jquery
valuebound
 
PPTX
Introduction to whats new in css3
Usman Mehmood
 
PPTX
Presentation about html5 css3
Gopi A
 
Introduction to HTML and CSS
Mario Hernandez
 
A quick guide to Css and java script
AVINASH KUMAR
 
Overview of PHP and MYSQL
Deblina Chowdhury
 
Wt unit 2 ppts client side technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Wt unit 2 ppts client sied technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 
Slow kinda sucks
Tim Wright
 
WEB DEVELOPMENT
Gourav Kaushik
 
Web Design Bootcamp - Day1
Aslam Najeebdeen
 
1812010023 web developement(ANKITA OJHA)CSE4(A).pptx
HarshJaiswal535013
 
JavaScriptL18 [Autosaved].pptx
VivekBaghel30
 
Web performance essentials - Goodies
Jerry Emmanuel
 
Web Development Fundamentals UNIT 1 & 2.pptx
GayathriPG3
 
Cartegraph Live HTML, CSS, JavaScript and jQuery Training
Shane Church
 
HTML_CSS_JS Workshop
GDSC UofT Mississauga
 
GDG-USAR Tech winter break 2024 USAR.pdf
raiaryan174
 
Introduction to Html5, css, Javascript and Jquery
valuebound
 
Introduction to whats new in css3
Usman Mehmood
 
Presentation about html5 css3
Gopi A
 
Ad

More from Ayes Chinmay (7)

PPTX
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-2) [HTTP & HTML]
Ayes Chinmay
 
PPTX
Internet and Web Technology (CLASS-1) [Introduction]
Ayes Chinmay
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Ayes Chinmay
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-2) [HTTP & HTML]
Ayes Chinmay
 
Internet and Web Technology (CLASS-1) [Introduction]
Ayes Chinmay
 
Ad

Recently uploaded (20)

PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
PPTX
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 

Internet and Web Technology (CLASS-4) [CSS & JS]

  • 2. IWT Syllabus: Module 2: Java Script Scripting: Java script: Introduction, statements, comments, variables, operators, documents, forms, functions, objects, events, Strings, Numbers, Arrays, Date, Math, Random, Loops, Regxp, errors, this, Let, Const., classes, debugging . The HTML DOM (Document Object Model) Introduction, DOM Methods, DOM Document, DOM Elements , DOM HTML, DOM CSS, DOM Events, DOM Navigation, DOM Nodes , DOM Nodelist The Browser Object Model (BOM) The Window Object, Window Size, Window History, Window Navigator, Browser Detection, JavaScript Timing Events, Cookies, Working on Cookies using Java script.
  • 3. CSS:  CSS stands for Cascaded Style Sheet.  Wium Lie has proposed the concept of CSS in 1994 (26 years ago).  The latest version of CSS 3 was published in 1999. World Wide Web Consortium (W3C) defines the specifications of CSS.  Father of HTML 5, CSS 3 => “Håkon Wium Lie”Håkon Wium Lie
  • 5. Types of CSS: 1) External CSS 2) Internal CSS 3) Inline CSS
  • 6. External CSS:  With an external style sheet, you can change the look of an entire website by changing just one file.  Each HTML page must include a reference to the external style sheet file inside the <link> element, inside the head section. <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> body { background-color: lightblue; } h1 { color: navy; margin-left: 20px; }
  • 7. Internal CSS:  An inline style may be used to apply a unique style for a single element.  To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property. <!DOCTYPE html> <html> <head> <style> body {background-color: linen;} h1 {color: maroon; margin-left: 40px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 8. Inline CSS:  An inline style may be used to apply a unique style for a single element.  To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property. <!DOCTYPE html> <html> <body> <h1 style="color:blue;text-align:center;"> This is a heading </h1> <p style="color:red;"> This is a paragraph. </p> </body> </html>
  • 9. JavaScript:  JavaScript enables interactive web pages and is an essential part of web applications.  First released in December 4, 1995 (24 years ago).  JavaScript is the dominant client-side scripting language of the Web, with 95% of websites using it for this purpose.  All major web browsers have a built-in JavaScript engine that executes the code on the user's device.  "JavaScript" is a trademark of Oracle Corporation in the United States. Brendan Eich
  • 10. JavaScript Syntax: <!DOCTYPE html> <html> <body> <h2>JavaScript Strings</h2> <p>Strings can be written with double or single quotes.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = 'John Doe'; </script> </body> </html>
  • 11. JavaScript Function: <!DOCTYPE html> <html> <body> <h2>JavaScript in Body</h2> <p id="demo">A Paragraph.</p> <button type="button" onclick="myFunction()">Try it</button> <button type="button" onclick="myFunction1()">Try it1</button> </body> </html> <script> function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; } function myFunction1() { document.getElementById("demo").innerHTML = "Paragraph changed1."; } </script>
  • 12. JavaScript Random Function: <!DOCTYPE html> <html> <body> <h2>JavaScript Math.random()</h2> <p>Math.random() returns a random number between 0 (included) and 1 (excluded):</p> <button onclick="check()"> Random </button> <p id="demo"></p> <script> var a=10; function check(){ document.getElementById("demo").innerHTML = a*Math.random(); } </script> </body> </html>
  • 13. JavaScript Array: <!DOCTYPE html> <html> <body> <h2>JavaScript Arrays</h2> <p>JavaScript array elements are accessed using numeric indexes (starting from 0).</p> <p id="demo"></p> <script> var cars = ["Saab", "Volvo", "BMW"]; document.getElementById("demo").innerHTML = cars[0]; </script> </body> </html>
  • 14. JavaScript Regular Expression:  A regular expression is a sequence of characters that forms a search pattern.  The search pattern can be used for text search and text replace operations. What Is a Regular Expression?  A regular expression is a sequence of characters that forms a search pattern.  When you search for data in a text, you can use this search pattern to describe what you are searching for.  A regular expression can be a single character, or a more complicated pattern.  Regular expressions can be used to perform all types of text search and text replace operations.
  • 15. JavaScript replace() & search(): <!DOCTYPE html> <html> <body> <h2>JavaScript Regular Expressions</h2> <p>Replace "microsoft" with "W3Schools" in the paragraph below:</p> <button onclick="myFunction()">Try it</button> <p id="demo">Please visit Microsoft and Microsoft!</p> <script> function myFunction() { var str = document.getElementById("demo").innerHTML; var txt = str.replace(/microsoft/i,"W3Schools"); document.getElementById("demo").innerHTML = txt; } </script> </body> </html> <!DOCTYPE html> <html> <body> <h2>JavaScript Regular Expressions</h2> <p>Search a string for "w3Schools", and display the position of the match:</p> <p id="demo"></p> <script> var str = "Visit W3Schools!"; var n = str.search(/w3Schools/i); document.getElementById("demo").innerHTML = n; </script> </body> </html>
  • 16. Model Questions: 1. The correct syntax for adding yellow as a background colour in HTML is: (a) < body style="background-color:yellow"> (b) <backgroundcolor>yellow</background color> (c) <color.background="yellow"> (d) <backgrndcolor="yellow"> 2. The HTML tag used to make a text italic is (a) <italic> (b) <i> (c) <textitalic> (d) <slantingtext>
  • 17. Model Questions: (Cont.) 3. The HTML tag used to define an internal style sheet is (a) <style> (b) <stylesheet> (c) <css> (d) <internal link> 4. JavaScript is defined under which HTML element? (a) <jscript> (b) <script> (c) <scriptjava> (d) <define.js> 5. Which of the following statements is used for creating a function? (a) function=Functionname() (b) function Functionname() (c) function:Functionname() (d) function "Functionname"