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)

PPTX
Web development
GarvitBaleshwar
 
PPTX
Introduction to HTML+CSS+Javascript by Deepu.pptx
deepuranjankumar08
 
PPTX
Shreyansh_patni web developer
Shreyanshpatni5
 
PDF
Presentation on htmlcssjs-130221085257-phpapp02.pdf
MeetRajani2
 
PPTX
Presentation
Chetan Kataria
 
PPS
Web Designing
VNIT-ACM Student Chapter
 
PPTX
Workshop 2 Slides.pptx
DaniyalSardar
 
PPTX
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
umar630934
 
PDF
WEB DEVELOPMENT20CS41.pdf
DeepakMeena597272
 
PPTX
Introduction to Web Techniques_Key componenets_HTML Basics
DeepakUlape2
 
PPTX
Web Development Fundamentals UNIT 1 & 2.pptx
GayathriPG3
 
PPTX
DHTML
Ravinder Kamboj
 
PPTX
Web Development basics with WordPress
Rashna Maharjan
 
PPT
A quick guide to Css and java script
AVINASH KUMAR
 
PDF
HTML2.pdf
202GCET19
 
PDF
Html,javascript & css
Predhin Sapru
 
PDF
Complete JavaScript Guide Notes Examples
Javier Crisostomo
 
PDF
Javascript Html Css A Stepbystep Guide Student Student
zorahpyzer7p
 
PPTX
Html, css and jquery introduction
cncwebworld
 
Web development
GarvitBaleshwar
 
Introduction to HTML+CSS+Javascript by Deepu.pptx
deepuranjankumar08
 
Shreyansh_patni web developer
Shreyanshpatni5
 
Presentation on htmlcssjs-130221085257-phpapp02.pdf
MeetRajani2
 
Presentation
Chetan Kataria
 
Workshop 2 Slides.pptx
DaniyalSardar
 
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
umar630934
 
WEB DEVELOPMENT20CS41.pdf
DeepakMeena597272
 
Introduction to Web Techniques_Key componenets_HTML Basics
DeepakUlape2
 
Web Development Fundamentals UNIT 1 & 2.pptx
GayathriPG3
 
Web Development basics with WordPress
Rashna Maharjan
 
A quick guide to Css and java script
AVINASH KUMAR
 
HTML2.pdf
202GCET19
 
Html,javascript & css
Predhin Sapru
 
Complete JavaScript Guide Notes Examples
Javier Crisostomo
 
Javascript Html Css A Stepbystep Guide Student Student
zorahpyzer7p
 
Html, css and jquery introduction
cncwebworld
 
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)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PDF
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 

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"