SlideShare a Scribd company logo
Html, css and jquery introduction
What is HTML
 HTML stands for Hyper Text Markup Language
 HTML is used for describing web pages.
 HTML is a markup language.
 A markup language consist of markup tags.
 The tags defines document content.
 HTML documents include HTML tags and plain text.
HTML Tags
 HTML markup tags are usually called HTML tags.
 HTML tags are keywords surrounded by angle brackets like
<HTML>.
 Html tags normally come in pairs like <b>and </b>.
 The first tag in pair is the start tag and second tag is the
end tag.
 The end tag is written like the start tag , with a forward
slash before the tag name.
 Start and end tags are also called opening tags and closing
tags.
<tagname>Content</tagname>
Basic HTML page structure
 HTML
 HEAD: Non web displayable info and code like meta tags,
script, title etc.
 BODY: Includes <div>
div: Header – We can include branding and navigation
elements like logo, slogan, menu, etc.
div: Main content – We can include all kind of
elements like images, paragraphs, videos, links, etc.
div: Footer – We can include informational elements
like: copyright, sub menu, links, site info, etc.
Example
<html>
<head>
<title>HTML Form Validation Demo</title>
</head>
<body>
<form action=“” id=“”>
<h2>HTML Form</h2>
<div id=“form_data”>
<div class=“fieldgroup”>
<label>Email</label>
<input type=“text” name=“email”>
</div>
<div class=“fieldgroup”>
<label>Password</label>
<input type=“password” name=“password”>
</div>
<div class=“fieldgroup”>
<input type=“submit” value=“submit” class=“submit”>
</div>
</div>
</form>
</body>
</html>
What is CSS
 CSS stands for Cascading Style Sheet.
 Styles define how to display HTML elements.
 External style sheets can save a lot of work.
 External style sheets are stored in CSS file.
 A CSS file allows to separate web sites HTML content
from its style.
How to use CSS?
There are three types of stylesheets
 External style sheet
 Internal style sheet
 Inline style sheet
 External style sheet: An external style sheet is ideal when the style is applied to many
pages.
<head>
<link rel=“stylesheet” type=“text/css” href=“mystyle.css”>
<head>
 Internal style sheet: An internal style sheet should be used when a single document has a
unique style.
<head>
<style>
p {margin-left:200px}
body{background-image:url(“images/back40.gif”);}
</style>
</head>
 Inline styles: To use Inline styles use the style attribute in
the relevent tag. The style attribute can contain any CSS
property.
< p style=“color.#fafafa;margin-left:20px”>This is a
paragraph.</p>
 Multiple styles will cascade into one:
Cascading order:
 Inline style (inside an HTMLelement)
 Inline style sheet (in the head section)
 External style sheet
 Browser default
CSS Syntax
 A CSS rule has two main parts: a selector, and one or more declarations
 H1 {color:blue; font-size: 12px;}
In this example H1 is a selector
Color:blue and font-size:12px is a declaration.
Color is a property and blue is a value.
Font-size is a property and 12px is a value.
 Combining selectors:
h1, h2, h3, h4, h5, h6{
color: #009900;
font family: Georgia, sans-serif;
}
 The id selector
The id selector is used to specify a style for a single, unique
element.
The id selector uses the id attribute of the HTML element,
and is defined with a “#”.
Syntax: #selector-id {property:value;}
 The class selector
The class selector is used to specify a style for a group of
elements.
The class selector uses the HTML class attribute, and is
defined with a “.”
Syntax: selector-class {property: value;}
 Below are the various ways you can use CSS to style
links.
a:link {color: #009900}
a:visited{color: #999999}
a:hover {color: #333333}
a:focus {color: #333333}
a:active {color: #009900}
The CSS Box Model
 All HTML elements can be considered as boxes. In CSS
the term “box model” is used when talking about
design and layout.
 The CSS box model is essentially a box that wraps
aroun HTML elements and consists of: margin, border,
padding and the actual content.
 The box model allows to place a border around
elements and space elements in relation to other
elements.
What is jQuery
 jQuery is a lightweight, “write less, do more”, Javascript library.
 The purpose of jQuery is to make it much easier to use javascript on your
website.
 jQuery takes a lot of common tasks that requires many lines of javascript
code to accomplish, and wraps it into methods that you can call with a
single line of code.
 jQery also simplifies a lot of the complicated things from javascript like
Ajax call and DOM manipulation.
Features:
 HTML/DOM manipulation
 CSS manipulation
 HTML event methods
 Effects and animations
 Ajax
jQuery Syntax
Basic syntax
$(selector).action()
 A $ sign to define jQuery
 A(selector) to find HTML elements
 AjQuery action to be performed on the elements.
Example:
$(“p”).hide() – hides all <p> elements
How to use jQuery:
<head>
<script
src=“//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></
script>
</head>
The element, id and class selector
The jQuery element selector selects elements based on their tag
names.
 $(“<tag-name>”) //element selector
 $(“#<id-name>”) //id selector
 $(“.<class-name>”) //class selector
Example
$(document).ready(function(){
$(“button”).click (function(){
$(“p”).hide();
$(“#test”).hide(); //#id selector
$(“.test”).hide(); //.class selector
});
});
jQuery Event
All the different visitors actions that a web page can respond
to are called events.
An event represents the precise moment when something
happens.
 Mouse events:
Click
Dblclick
Mouseenter
Mouseleave
 Keyboard events:
Keypress
Keydown
Keyup
• Form events:
Submit
Change
Focus
Blur
• Document events:
Load
Resize
Scroll
Unload
Example:
$(“p”).click(function(){
//action goes here
});
jQuery Effects
 Jquery hide(), show() and toggle() method
$(selector).hide(speed,callback);
$(selector).show(speed,callback);
$(selector).toggle(speed,callback);
 Jquery fadeIn(), fadeOut(), fadeToggle() and fadeTo()
method.
$(selector).fadeIn(speed,callback);
$(selector).fadeOut(speed,callback);
$(selector). fadeToggle (speed,callback);
$(selector). fadeTo(speed,callback);

More Related Content

What's hot (20)

PPTX
Introduction to web design discussing which languages is used for website des...
Aditya Dwivedi
 
PPTX
Introduction to CSS
Folasade Adedeji
 
PPTX
Html css java script basics All about you need
Dipen Parmar
 
PDF
HTML CSS Basics
Mai Moustafa
 
PPTX
(Fast) Introduction to HTML & CSS
Dave Kelly
 
PPTX
html-css
Dhirendra Chauhan
 
PDF
Intro to HTML & CSS
Syed Sami
 
PPTX
Introduction to html course digital markerters
SEO SKills
 
PDF
HTML CSS JS in Nut shell
Ashwin Shiv
 
PPTX
Css Basics
Jay Patel
 
PPTX
Css
Hemant Saini
 
PDF
Web front end development introduction to html css and javascript
Marc Huang
 
PPTX
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
PDF
3 Layers of the Web - Part 1
Jeremy White
 
PPTX
Html & CSS
JainilSampat
 
PPT
Html introduction
Nuhu Abdul Razak
 
ODP
CSS Basics
Sanjeev Kumar
 
PPTX
Introduction to HTML
Meghan Frisco
 
Introduction to web design discussing which languages is used for website des...
Aditya Dwivedi
 
Introduction to CSS
Folasade Adedeji
 
Html css java script basics All about you need
Dipen Parmar
 
HTML CSS Basics
Mai Moustafa
 
(Fast) Introduction to HTML & CSS
Dave Kelly
 
Intro to HTML & CSS
Syed Sami
 
Introduction to html course digital markerters
SEO SKills
 
HTML CSS JS in Nut shell
Ashwin Shiv
 
Css Basics
Jay Patel
 
Web front end development introduction to html css and javascript
Marc Huang
 
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
3 Layers of the Web - Part 1
Jeremy White
 
Html & CSS
JainilSampat
 
Html introduction
Nuhu Abdul Razak
 
CSS Basics
Sanjeev Kumar
 
Introduction to HTML
Meghan Frisco
 

Similar to Html, css and jquery introduction (20)

PDF
Presentation on htmlcssjs-130221085257-phpapp02.pdf
MeetRajani2
 
ODP
Introduction of Html/css/js
Knoldus Inc.
 
PPTX
Html,Css,Js INTERNSHIP REPORT By SELF pptx
deepuranjankumar08
 
PPTX
Introduction to Web Development.pptx
GDSCVJTI
 
PPTX
Introduction to Web Development.pptx
Alisha Kamat
 
PPTX
Introduction to Web Development.pptx
Alisha Kamat
 
PPTX
Workshop 2 Slides.pptx
DaniyalSardar
 
PDF
Html & Html5 from scratch
Ahmad Al-ammar
 
PPTX
WELCOME (recovernjkgnjvnvnfjkvnjknnbfjked).pptx
HarshwardhanPatil52
 
PPTX
presentation in html,css,javascript
FaysalAhammed5
 
PPTX
Languages for web(HTML,CSS,JS)
MHR11
 
PPTX
Presentation
Chetan Kataria
 
PPTX
1812010023 web developement(ANKITA OJHA)CSE4(A).pptx
HarshJaiswal535013
 
PDF
HTML+CSS: how to get started
Dimitris Tsironis
 
PDF
slidesgo-mastering-html-and-css-a-comprehensive-guide-to-tags-and-elements-20...
MrunmayiLohakare
 
PPTX
Shreyansh_patni web developer
Shreyanshpatni5
 
PPTX
HTML Lesson HTML FormsHTML Formsvv4.pptx
gacayte0906
 
PPT
xhtml_css.ppt
fakeaccount225095
 
PPTX
Web Development basics with WordPress
Rashna Maharjan
 
PPTX
Html starting
Rahul Dihora
 
Presentation on htmlcssjs-130221085257-phpapp02.pdf
MeetRajani2
 
Introduction of Html/css/js
Knoldus Inc.
 
Html,Css,Js INTERNSHIP REPORT By SELF pptx
deepuranjankumar08
 
Introduction to Web Development.pptx
GDSCVJTI
 
Introduction to Web Development.pptx
Alisha Kamat
 
Introduction to Web Development.pptx
Alisha Kamat
 
Workshop 2 Slides.pptx
DaniyalSardar
 
Html & Html5 from scratch
Ahmad Al-ammar
 
WELCOME (recovernjkgnjvnvnfjkvnjknnbfjked).pptx
HarshwardhanPatil52
 
presentation in html,css,javascript
FaysalAhammed5
 
Languages for web(HTML,CSS,JS)
MHR11
 
Presentation
Chetan Kataria
 
1812010023 web developement(ANKITA OJHA)CSE4(A).pptx
HarshJaiswal535013
 
HTML+CSS: how to get started
Dimitris Tsironis
 
slidesgo-mastering-html-and-css-a-comprehensive-guide-to-tags-and-elements-20...
MrunmayiLohakare
 
Shreyansh_patni web developer
Shreyanshpatni5
 
HTML Lesson HTML FormsHTML Formsvv4.pptx
gacayte0906
 
xhtml_css.ppt
fakeaccount225095
 
Web Development basics with WordPress
Rashna Maharjan
 
Html starting
Rahul Dihora
 
Ad

More from cncwebworld (8)

PDF
Php framework
cncwebworld
 
PPTX
Introduction to android app development
cncwebworld
 
PPTX
Php Framework
cncwebworld
 
PDF
Angular JS tutorial
cncwebworld
 
PPTX
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
PPTX
.Net the begining
cncwebworld
 
PDF
Best programming language to learn in 2018
cncwebworld
 
PPTX
Best tech jobs in present scenario
cncwebworld
 
Php framework
cncwebworld
 
Introduction to android app development
cncwebworld
 
Php Framework
cncwebworld
 
Angular JS tutorial
cncwebworld
 
ANGULAR JS TRAINING IN PUNE
cncwebworld
 
.Net the begining
cncwebworld
 
Best programming language to learn in 2018
cncwebworld
 
Best tech jobs in present scenario
cncwebworld
 
Ad

Recently uploaded (20)

PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 

Html, css and jquery introduction

  • 2. What is HTML  HTML stands for Hyper Text Markup Language  HTML is used for describing web pages.  HTML is a markup language.  A markup language consist of markup tags.  The tags defines document content.  HTML documents include HTML tags and plain text.
  • 3. HTML Tags  HTML markup tags are usually called HTML tags.  HTML tags are keywords surrounded by angle brackets like <HTML>.  Html tags normally come in pairs like <b>and </b>.  The first tag in pair is the start tag and second tag is the end tag.  The end tag is written like the start tag , with a forward slash before the tag name.  Start and end tags are also called opening tags and closing tags. <tagname>Content</tagname>
  • 4. Basic HTML page structure  HTML  HEAD: Non web displayable info and code like meta tags, script, title etc.  BODY: Includes <div> div: Header – We can include branding and navigation elements like logo, slogan, menu, etc. div: Main content – We can include all kind of elements like images, paragraphs, videos, links, etc. div: Footer – We can include informational elements like: copyright, sub menu, links, site info, etc.
  • 5. Example <html> <head> <title>HTML Form Validation Demo</title> </head> <body> <form action=“” id=“”> <h2>HTML Form</h2> <div id=“form_data”> <div class=“fieldgroup”> <label>Email</label> <input type=“text” name=“email”> </div> <div class=“fieldgroup”> <label>Password</label> <input type=“password” name=“password”> </div> <div class=“fieldgroup”> <input type=“submit” value=“submit” class=“submit”> </div> </div> </form> </body> </html>
  • 6. What is CSS  CSS stands for Cascading Style Sheet.  Styles define how to display HTML elements.  External style sheets can save a lot of work.  External style sheets are stored in CSS file.  A CSS file allows to separate web sites HTML content from its style.
  • 7. How to use CSS? There are three types of stylesheets  External style sheet  Internal style sheet  Inline style sheet  External style sheet: An external style sheet is ideal when the style is applied to many pages. <head> <link rel=“stylesheet” type=“text/css” href=“mystyle.css”> <head>  Internal style sheet: An internal style sheet should be used when a single document has a unique style. <head> <style> p {margin-left:200px} body{background-image:url(“images/back40.gif”);} </style> </head>
  • 8.  Inline styles: To use Inline styles use the style attribute in the relevent tag. The style attribute can contain any CSS property. < p style=“color.#fafafa;margin-left:20px”>This is a paragraph.</p>  Multiple styles will cascade into one: Cascading order:  Inline style (inside an HTMLelement)  Inline style sheet (in the head section)  External style sheet  Browser default
  • 9. CSS Syntax  A CSS rule has two main parts: a selector, and one or more declarations  H1 {color:blue; font-size: 12px;} In this example H1 is a selector Color:blue and font-size:12px is a declaration. Color is a property and blue is a value. Font-size is a property and 12px is a value.  Combining selectors: h1, h2, h3, h4, h5, h6{ color: #009900; font family: Georgia, sans-serif; }
  • 10.  The id selector The id selector is used to specify a style for a single, unique element. The id selector uses the id attribute of the HTML element, and is defined with a “#”. Syntax: #selector-id {property:value;}  The class selector The class selector is used to specify a style for a group of elements. The class selector uses the HTML class attribute, and is defined with a “.” Syntax: selector-class {property: value;}
  • 11.  Below are the various ways you can use CSS to style links. a:link {color: #009900} a:visited{color: #999999} a:hover {color: #333333} a:focus {color: #333333} a:active {color: #009900}
  • 12. The CSS Box Model  All HTML elements can be considered as boxes. In CSS the term “box model” is used when talking about design and layout.  The CSS box model is essentially a box that wraps aroun HTML elements and consists of: margin, border, padding and the actual content.  The box model allows to place a border around elements and space elements in relation to other elements.
  • 13. What is jQuery  jQuery is a lightweight, “write less, do more”, Javascript library.  The purpose of jQuery is to make it much easier to use javascript on your website.  jQuery takes a lot of common tasks that requires many lines of javascript code to accomplish, and wraps it into methods that you can call with a single line of code.  jQery also simplifies a lot of the complicated things from javascript like Ajax call and DOM manipulation. Features:  HTML/DOM manipulation  CSS manipulation  HTML event methods  Effects and animations  Ajax
  • 14. jQuery Syntax Basic syntax $(selector).action()  A $ sign to define jQuery  A(selector) to find HTML elements  AjQuery action to be performed on the elements. Example: $(“p”).hide() – hides all <p> elements How to use jQuery: <head> <script src=“//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></ script> </head>
  • 15. The element, id and class selector The jQuery element selector selects elements based on their tag names.  $(“<tag-name>”) //element selector  $(“#<id-name>”) //id selector  $(“.<class-name>”) //class selector Example $(document).ready(function(){ $(“button”).click (function(){ $(“p”).hide(); $(“#test”).hide(); //#id selector $(“.test”).hide(); //.class selector }); });
  • 16. jQuery Event All the different visitors actions that a web page can respond to are called events. An event represents the precise moment when something happens.  Mouse events: Click Dblclick Mouseenter Mouseleave  Keyboard events: Keypress Keydown Keyup
  • 17. • Form events: Submit Change Focus Blur • Document events: Load Resize Scroll Unload Example: $(“p”).click(function(){ //action goes here });
  • 18. jQuery Effects  Jquery hide(), show() and toggle() method $(selector).hide(speed,callback); $(selector).show(speed,callback); $(selector).toggle(speed,callback);  Jquery fadeIn(), fadeOut(), fadeToggle() and fadeTo() method. $(selector).fadeIn(speed,callback); $(selector).fadeOut(speed,callback); $(selector). fadeToggle (speed,callback); $(selector). fadeTo(speed,callback);