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

PPTX
Internet and Web Technology (CLASS-3) [HTML & CSS]
PPTX
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
PPTX
Internet and Web Technology (CLASS-5) [HTML DOM]
PPTX
Css presentation lecture 1
KEY
HTML/CSS Lecture 1
PPSX
HTML & XHTML Basics
PPTX
Web Information Systems XML
PPTX
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-3) [HTML & CSS]
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-5) [HTML DOM]
Css presentation lecture 1
HTML/CSS Lecture 1
HTML & XHTML Basics
Web Information Systems XML
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...

What's hot (20)

PPTX
Web Information Systems Html and css
PPTX
uptu web technology unit 2 html
PPT
Document Object Model
PPT
Boostrap basics
PPTX
Html - By Auroskkil
PDF
CSS-3 Course Slide
PPTX
Hushang Gaikwad
PPTX
Dhtml
PDF
Html css workshop, lesson 0, how browsers work
PPTX
Internet and Web Technology (CLASS-6) [BOM]
PPTX
Dynamic HTML (DHTML)
PPTX
Html & CSS
PDF
HTML Lecture Part 1 of 2
PPTX
uptu web technology unit 2 html
PPTX
How the Web Works Using HTML
PDF
Html / CSS Presentation
PDF
Basic Details of HTML and CSS.pdf
Web Information Systems Html and css
uptu web technology unit 2 html
Document Object Model
Boostrap basics
Html - By Auroskkil
CSS-3 Course Slide
Hushang Gaikwad
Dhtml
Html css workshop, lesson 0, how browsers work
Internet and Web Technology (CLASS-6) [BOM]
Dynamic HTML (DHTML)
Html & CSS
HTML Lecture Part 1 of 2
uptu web technology unit 2 html
How the Web Works Using HTML
Html / CSS Presentation
Basic Details of HTML and CSS.pdf
Ad

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

PPTX
Web development
PPTX
Introduction to HTML+CSS+Javascript by Deepu.pptx
PPTX
Shreyansh_patni web developer
PDF
Presentation on htmlcssjs-130221085257-phpapp02.pdf
PPTX
Presentation
PPS
PPTX
Workshop 2 Slides.pptx
PPTX
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
PDF
WEB DEVELOPMENT20CS41.pdf
PPTX
Introduction to Web Techniques_Key componenets_HTML Basics
PPTX
Web Development Fundamentals UNIT 1 & 2.pptx
PPTX
PPTX
Web Development basics with WordPress
PPT
A quick guide to Css and java script
PDF
HTML2.pdf
PDF
Html,javascript & css
PDF
Complete JavaScript Guide Notes Examples
PDF
Javascript Html Css A Stepbystep Guide Student Student
PPTX
Html, css and jquery introduction
Web development
Introduction to HTML+CSS+Javascript by Deepu.pptx
Shreyansh_patni web developer
Presentation on htmlcssjs-130221085257-phpapp02.pdf
Presentation
Workshop 2 Slides.pptx
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
WEB DEVELOPMENT20CS41.pdf
Introduction to Web Techniques_Key componenets_HTML Basics
Web Development Fundamentals UNIT 1 & 2.pptx
Web Development basics with WordPress
A quick guide to Css and java script
HTML2.pdf
Html,javascript & css
Complete JavaScript Guide Notes Examples
Javascript Html Css A Stepbystep Guide Student Student
Html, css and jquery introduction
Ad

More from Ayes Chinmay (7)

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

Recently uploaded (20)

PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
Journal of Dental Science - UDMY (2021).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
HVAC Specification 2024 according to central public works department
PDF
advance database management system book.pdf
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PPTX
Module on health assessment of CHN. pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
Education and Perspectives of Education.pptx
PDF
My India Quiz Book_20210205121199924.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Empowerment Technology for Senior High School Guide
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
Journal of Dental Science - UDMY (2021).pdf
English Textual Question & Ans (12th Class).pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
HVAC Specification 2024 according to central public works department
advance database management system book.pdf
Race Reva University – Shaping Future Leaders in Artificial Intelligence
Module on health assessment of CHN. pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Core Concepts of Personalized Learning and Virtual Learning Environments
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
Introduction to pro and eukaryotes and differences.pptx
Cambridge-Practice-Tests-for-IELTS-12.docx
Education and Perspectives of Education.pptx
My India Quiz Book_20210205121199924.pdf

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"