SlideShare a Scribd company logo
1 of 14
Web Programming
SYED SHAHZAIB SOHAIL
Lecture 1
Introduction to HTML
Contents
• HTML Elements
• HTML Attributes
• CoreAttributes
• Generic Attributes
HTML Elements
• What are HTML elements?
• An HTML element starts with a starting tag. If the element contains any content it
ends with a closing tag.
StartTag Content EndTag
<p> Paragraph content </p>
<h1> Heading content </h1>
<img />
Continued…
• <start tag> … content … </end tag>
Element
HTML Attributes
• Attributes are the specific properties of every HTML element.
• They provide additional information.
• They are always specified in start tag of an element.
Continued…
• For example; <img /> tag have two main attributes, src & alt.
• src defines the url (or path) of the image file, while alt specifies the alternate
text if the image is not found.
• <a></a> is a link tag whose main attribute is href whole value is any internal
or external link.
• While attributes like height, width, align etc are common for all attributes.
Core Attributes
• The four core attributes that can be used on majority of HTML elements are:
• Id
• Class
• Title
• Style
Id Attribute
• The id attribute of an HTML tag can be used to uniquely identify any
element within an HTML page.There are two primary reasons that you
might want to use an id attribute on an element:
• If an element carries an id attribute as a unique identifier, it is possible to identify just
that element and its content.
• If you have two elements of the same name within aWeb page (or style sheet), you can
use the id attribute to distinguish between elements that have the same name.
Continued…
• Example:
Class Attribute
• The class attribute is used to associate an element with a style sheet, and
specifies the class of element.
• The value of the attribute may also be a space separated list of class names.
Title Attribute
• The title attribute gives a suggested title for the element.They syntax for
the title attribute is similar as explained for id attribute.
Style Attribute
• The style attribute allows you to specify Cascading Style Sheet (CSS) rules
within the element.
Generic Attributes
Attributes Options Function
Align Left, right, center Horizontally align tags
Valign Top, middle, bottom Vertically align tags
Bgcolor Numeric, decimal, RGB values Places a background color behind
an element
Background URL Places a background image
behind an element
Width Numeric value Specifies the width
Height Numeric value Specifies the height

More Related Content

What's hot

What's hot (20)

Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
CSS 101
CSS 101CSS 101
CSS 101
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
Css
CssCss
Css
 
CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css
CssCss
Css
 
Web Development 3 (HTML & CSS)
Web Development 3  (HTML & CSS)Web Development 3  (HTML & CSS)
Web Development 3 (HTML & CSS)
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
Web Development 4
Web Development 4Web Development 4
Web Development 4
 
Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)
 
CSS
CSSCSS
CSS
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
CSS Basic Introduction, Rules, And Tips
CSS Basic Introduction, Rules, And TipsCSS Basic Introduction, Rules, And Tips
CSS Basic Introduction, Rules, And Tips
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 

Similar to Web Development - Lecture 4

web development.pdf
web development.pdfweb development.pdf
web development.pdf
BagHarki
 

Similar to Web Development - Lecture 4 (20)

Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
HTML - part 1
HTML - part 1HTML - part 1
HTML - part 1
 
Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)
 
Presentation html
Presentation   htmlPresentation   html
Presentation html
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)
 
Basic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdfBasic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdf
 
Batch -25 PPT.pptx
Batch -25 PPT.pptxBatch -25 PPT.pptx
Batch -25 PPT.pptx
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
 
Html5 attributes
Html5  attributesHtml5  attributes
Html5 attributes
 
HTML 5 Topic 2
HTML 5 Topic 2HTML 5 Topic 2
HTML 5 Topic 2
 
Html
HtmlHtml
Html
 
HTML : INTRODUCTION TO WEB DESIGN Presentation
HTML : INTRODUCTION TO WEB DESIGN PresentationHTML : INTRODUCTION TO WEB DESIGN Presentation
HTML : INTRODUCTION TO WEB DESIGN Presentation
 
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJSBasic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
 
AttributesL3.pptx
AttributesL3.pptxAttributesL3.pptx
AttributesL3.pptx
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
Presentation1.pdf
Presentation1.pdfPresentation1.pdf
Presentation1.pdf
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptx
 

Recently uploaded

Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
Silpa
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Exploring Criminology and Criminal Behaviour.pdf
Exploring Criminology and Criminal Behaviour.pdfExploring Criminology and Criminal Behaviour.pdf
Exploring Criminology and Criminal Behaviour.pdf
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
Stages in the normal growth curve
Stages in the normal growth curveStages in the normal growth curve
Stages in the normal growth curve
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
Locating and isolating a gene, FISH, GISH, Chromosome walking and jumping, te...
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptxIntroduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptx
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 

Web Development - Lecture 4

  • 3. Contents • HTML Elements • HTML Attributes • CoreAttributes • Generic Attributes
  • 4. HTML Elements • What are HTML elements? • An HTML element starts with a starting tag. If the element contains any content it ends with a closing tag. StartTag Content EndTag <p> Paragraph content </p> <h1> Heading content </h1> <img />
  • 5. Continued… • <start tag> … content … </end tag> Element
  • 6. HTML Attributes • Attributes are the specific properties of every HTML element. • They provide additional information. • They are always specified in start tag of an element.
  • 7. Continued… • For example; <img /> tag have two main attributes, src & alt. • src defines the url (or path) of the image file, while alt specifies the alternate text if the image is not found. • <a></a> is a link tag whose main attribute is href whole value is any internal or external link. • While attributes like height, width, align etc are common for all attributes.
  • 8. Core Attributes • The four core attributes that can be used on majority of HTML elements are: • Id • Class • Title • Style
  • 9. Id Attribute • The id attribute of an HTML tag can be used to uniquely identify any element within an HTML page.There are two primary reasons that you might want to use an id attribute on an element: • If an element carries an id attribute as a unique identifier, it is possible to identify just that element and its content. • If you have two elements of the same name within aWeb page (or style sheet), you can use the id attribute to distinguish between elements that have the same name.
  • 11. Class Attribute • The class attribute is used to associate an element with a style sheet, and specifies the class of element. • The value of the attribute may also be a space separated list of class names.
  • 12. Title Attribute • The title attribute gives a suggested title for the element.They syntax for the title attribute is similar as explained for id attribute.
  • 13. Style Attribute • The style attribute allows you to specify Cascading Style Sheet (CSS) rules within the element.
  • 14. Generic Attributes Attributes Options Function Align Left, right, center Horizontally align tags Valign Top, middle, bottom Vertically align tags Bgcolor Numeric, decimal, RGB values Places a background color behind an element Background URL Places a background image behind an element Width Numeric value Specifies the width Height Numeric value Specifies the height