SlideShare a Scribd company logo
Web Engineering
Mam Alia
In HTML an image map is a list of coordinates relating to a
specific image, created in order to hyperlink areas of
the image to different destinations (as opposed to a
normal image link, in which the entire area of
the image links to a single destination).
In HTML an image map is a list of coordinates relating to a
specific image, created in order to hyperlink areas of
the image to different destinations (as opposed to a
normal image link, in which the entire area of
the image links to a single destination).
<html><head></head><body>
<h1> Image Mapping </h1>
<map name="imgmap">
<center><img src="aos.png" usemap="#Asad"> </center>
<map name="Asad">
<area shape="rect" coords="1,253,170,511" href="#ASAD">
<area shape="circle" coords="324,408,77"href="#saad">
<area shape="poly" coords="314,71,295,130,297,234,406,233,401,221"
href="#Mussadiq">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h1><a name="ASAD">ASAD</a></h1>
<img src="420227.jpg">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h1><a name="saad">saad</a></h1>
<img src="WEB.png">
<h1><a name="Mussadiq">Mussadiq</a></h1>
<img src="cc.png">
</body>
</html>
<area>-tag
<area shape="circle" coords="x,y,radius"href="file.html">
<area shape="rect" coords="x1,y1,x2,y2"href="file.html">
<area shape="poly" coords="x1,y1,…,xn,yn" href="file.html">
<h1><a name="ABC">ASAD</a></h1>
<img src=“Addres.type">
<h1><a name="ABC">ASAD</a></h1>
<img src=“Addres.type">
Single Selector
Child Selector
Descendant Selector
Adjacent Sibling Selector
General Sibling Selector
Single Selector
Child Selector
Descendant Selector
Adjacent Sibling Selector
General Sibling Selector
Single Selector
H1{
COLOR:RED;
}
Just effect on single tag
Child Selector
div > h1
{
color:green;
background-color:orange;
}
If have to apply on all tags in one Div or Box
Descendant Selector
div p
{
color:red;
background-color:gray;
}
Same as Child but work on 1st
tag
Adjacent Sibling Selector
h1+p+p
{
background-color:yellow;
}
Tag a specific tag after tag
The upper tag will effect only
Those p tag exist after h1->p->p
General Sibling Selector
h1 ~ p{ text-decoration:underline; }
It effect all tags after h1 paragraph
Script is a short piece of Program or a code.
We can add it by using <script>…</script>
In Html code.
• The <script> tag is used to define a client-
side script (JavaScript).
• The <script> element either contains
scripting statements, or it points to an
external script file through the src attribute.
• Common uses for JavaScript are image
manipulation, form validation,
and dynamic changes of content.
JavaScript != Java
JavaScript Variables :
• Variables are used to store data.
• A variable is a "container" for information you
want to store. A variable's value can change
during the script. You can refer to a variable by
name to see its value or to change its value.
• Rules for variable names:
– Variable names are case sensitive
– They must begin with a letter or the underscore
character
• strname – STRNAME (not same)
JavaScript Basic Examples
1) Output to a Browser Display
<html>
<head></head>
<body>
<script>
document.write("BsCs Web Engineering Class");
</script>
</body>
</html>
JavaScript Basic Examples
1) Output to a Browser Display
<html>
<head></head>
<body>
<script>
document.write("BsCs Web Engineering Class");
</script>
</body>
</html>
Output 
2) Creating a variable in JavaScript
Here variable can automatically sense the
data type .
var name_of_variable ;
Var = Is keyword for declaring a variable
; = termination Sign
2) Creating a variable in JavaScript
var a=5;
var b=“Asad”;
document.write(a); is will show 5 on screen
document.write(b); is will show Asad
2) Creating a variable in JavaScript
var a=5;
var b=“Asad”;
var ara= new Array(length);
ara[0]=“Asad”;
ara[1]=122;
So on…
3) Operations In JavaScripts
<html><head></head><body><font size=12>
<script>
var a=5;
var b=10;
var c=a+b;
document.write(c);
</script>
</font></body></html>
3) Operations In JavaScripts
<html><head></head><body><font size=12>
<script>
var a=5;
var b=10;
var c=a+b;
document.write(c);
</script>
</font></body></html>
Output 
Same for other operation .
Can use increment and decrement .
4) Functions in JavaScripts
<html><head>
<script>
function Asad(){document.write("Pak Pak
Pakistan")}
</script>
</head><body>
<script>Asad();</script>
</body></html>
4) Functions in JavaScripts
<html><head>
<script>
function Asad(){document.write("Pak Pak
Pakistan")}
</script>
</head><body>
<script>Asad();</script>
</body></html>
Output 
Flow Control Statements
5) If statement
<html><head></head><body><font size=12><script>
var a=5;
if(a>=5)
{
document.write("A is greater or Equal to 5");}
else
{
document.write("A is smaller then 5");
}
</script></font></body></html>
6) For Loop
<html><head></head><body><script>
for(i=1;i<6;i++)
{
document.write("BsCs Web Engineering
Class"+"<br>");
}
</script></body></html>
6) For Loop
<html><head></head><body><script>
for(i=1;i<6;i++)
{
document.write("BsCs Web Engineering
Class"+"<br>");
}
</script></body></html>
Output 
Dialog Boxes
• The alert dialog box
<script> alert(“Message”);</script>
• The confirm dialog box
<script> variable= confirm(“Message”);</script>
• The prompt dialog box
<script> variable=prompt(“Message”[“Default value”]);</script>
St=prompt(“Enter Name of city”,”Layyah”);
Confirm(“you entered city name :”+st);
Class selectors
Class selectors

More Related Content

Similar to Class selectors

Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
William Myers
 
Tags
TagsTags
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
Gopi A
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to server
shivanichourasia01
 
Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS] Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS]
Ayes Chinmay
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
bensmithett
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
bensmithett
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
crokitta
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Wt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technologyWt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
html-css
html-csshtml-css
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
Meenakshi Paul
 
Html 5
Html   5Html   5
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
Html
HtmlHtml
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
Even Wu
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
Shawn Calvert
 
Java script
Java scriptJava script
Java script
Sanjay Gunjal
 

Similar to Class selectors (20)

Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
Tags
TagsTags
Tags
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to server
 
Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS] Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS]
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
 
Wt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technologyWt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technology
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 
html-css
html-csshtml-css
html-css
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Html 5
Html   5Html   5
Html 5
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Html
HtmlHtml
Html
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Java script
Java scriptJava script
Java script
 

More from ITz_1

Data Mining in Operating System
Data Mining in Operating SystemData Mining in Operating System
Data Mining in Operating System
ITz_1
 
Software designm complexity
Software designm complexitySoftware designm complexity
Software designm complexity
ITz_1
 
Linux operating system
Linux operating systemLinux operating system
Linux operating system
ITz_1
 
Embedded Software
Embedded SoftwareEmbedded Software
Embedded Software
ITz_1
 
PCI
PCIPCI
PCI
ITz_1
 
5 major social institutions
5 major social institutions5 major social institutions
5 major social institutions
ITz_1
 
Java script programs
Java script programsJava script programs
Java script programs
ITz_1
 
Java script
Java scriptJava script
Java script
ITz_1
 

More from ITz_1 (8)

Data Mining in Operating System
Data Mining in Operating SystemData Mining in Operating System
Data Mining in Operating System
 
Software designm complexity
Software designm complexitySoftware designm complexity
Software designm complexity
 
Linux operating system
Linux operating systemLinux operating system
Linux operating system
 
Embedded Software
Embedded SoftwareEmbedded Software
Embedded Software
 
PCI
PCIPCI
PCI
 
5 major social institutions
5 major social institutions5 major social institutions
5 major social institutions
 
Java script programs
Java script programsJava script programs
Java script programs
 
Java script
Java scriptJava script
Java script
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 

Class selectors

  • 2.
  • 3.
  • 4.
  • 5.
  • 6. In HTML an image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to different destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination).
  • 7. In HTML an image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to different destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination).
  • 8. <html><head></head><body> <h1> Image Mapping </h1> <map name="imgmap"> <center><img src="aos.png" usemap="#Asad"> </center> <map name="Asad"> <area shape="rect" coords="1,253,170,511" href="#ASAD"> <area shape="circle" coords="324,408,77"href="#saad"> <area shape="poly" coords="314,71,295,130,297,234,406,233,401,221" href="#Mussadiq"> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <h1><a name="ASAD">ASAD</a></h1> <img src="420227.jpg"> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <h1><a name="saad">saad</a></h1> <img src="WEB.png"> <h1><a name="Mussadiq">Mussadiq</a></h1> <img src="cc.png"> </body> </html>
  • 9. <area>-tag <area shape="circle" coords="x,y,radius"href="file.html"> <area shape="rect" coords="x1,y1,x2,y2"href="file.html"> <area shape="poly" coords="x1,y1,…,xn,yn" href="file.html">
  • 12. Single Selector Child Selector Descendant Selector Adjacent Sibling Selector General Sibling Selector
  • 13. Single Selector Child Selector Descendant Selector Adjacent Sibling Selector General Sibling Selector
  • 15. Child Selector div > h1 { color:green; background-color:orange; } If have to apply on all tags in one Div or Box
  • 17. Adjacent Sibling Selector h1+p+p { background-color:yellow; } Tag a specific tag after tag The upper tag will effect only Those p tag exist after h1->p->p
  • 18. General Sibling Selector h1 ~ p{ text-decoration:underline; } It effect all tags after h1 paragraph
  • 19.
  • 20. Script is a short piece of Program or a code. We can add it by using <script>…</script> In Html code.
  • 21. • The <script> tag is used to define a client- side script (JavaScript). • The <script> element either contains scripting statements, or it points to an external script file through the src attribute. • Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
  • 22. JavaScript != Java JavaScript Variables : • Variables are used to store data. • A variable is a "container" for information you want to store. A variable's value can change during the script. You can refer to a variable by name to see its value or to change its value. • Rules for variable names: – Variable names are case sensitive – They must begin with a letter or the underscore character • strname – STRNAME (not same)
  • 23. JavaScript Basic Examples 1) Output to a Browser Display <html> <head></head> <body> <script> document.write("BsCs Web Engineering Class"); </script> </body> </html>
  • 24. JavaScript Basic Examples 1) Output to a Browser Display <html> <head></head> <body> <script> document.write("BsCs Web Engineering Class"); </script> </body> </html> Output 
  • 25. 2) Creating a variable in JavaScript Here variable can automatically sense the data type . var name_of_variable ; Var = Is keyword for declaring a variable ; = termination Sign
  • 26. 2) Creating a variable in JavaScript var a=5; var b=“Asad”; document.write(a); is will show 5 on screen document.write(b); is will show Asad
  • 27. 2) Creating a variable in JavaScript var a=5; var b=“Asad”; var ara= new Array(length); ara[0]=“Asad”; ara[1]=122; So on…
  • 28. 3) Operations In JavaScripts <html><head></head><body><font size=12> <script> var a=5; var b=10; var c=a+b; document.write(c); </script> </font></body></html>
  • 29. 3) Operations In JavaScripts <html><head></head><body><font size=12> <script> var a=5; var b=10; var c=a+b; document.write(c); </script> </font></body></html> Output  Same for other operation . Can use increment and decrement .
  • 30. 4) Functions in JavaScripts <html><head> <script> function Asad(){document.write("Pak Pak Pakistan")} </script> </head><body> <script>Asad();</script> </body></html>
  • 31. 4) Functions in JavaScripts <html><head> <script> function Asad(){document.write("Pak Pak Pakistan")} </script> </head><body> <script>Asad();</script> </body></html> Output 
  • 32. Flow Control Statements 5) If statement <html><head></head><body><font size=12><script> var a=5; if(a>=5) { document.write("A is greater or Equal to 5");} else { document.write("A is smaller then 5"); } </script></font></body></html>
  • 33. 6) For Loop <html><head></head><body><script> for(i=1;i<6;i++) { document.write("BsCs Web Engineering Class"+"<br>"); } </script></body></html>
  • 34. 6) For Loop <html><head></head><body><script> for(i=1;i<6;i++) { document.write("BsCs Web Engineering Class"+"<br>"); } </script></body></html> Output 
  • 35. Dialog Boxes • The alert dialog box <script> alert(“Message”);</script> • The confirm dialog box <script> variable= confirm(“Message”);</script> • The prompt dialog box <script> variable=prompt(“Message”[“Default value”]);</script> St=prompt(“Enter Name of city”,”Layyah”); Confirm(“you entered city name :”+st);