SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Web
Programming
Syed ShahzaibSohail
BSCS 2014-18
Contents
 HTML introduction
 HTML page structure
 HTML Basics
 HTML Tags
 HTML Elements
 HTML Attributes
HTML Introduction
 HTML stands for Hyper Text Markup Language
 HTML describes the structure of Web pages
using markup
 HTML elements are building blocks of HTML
pages
 HTML elements are represented by tags
What is markup?
 Markup is also known as HTML tags.
Example
 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
HTML Page Structure
HTML Basics
 All HTML documents must start with a
document type declaration: <!DOCTYPE
html>.
 The HTML document itself begins
with <html> and ends with </html>.
 The visible part of the HTML document is
between <body> and </body>.
HTML Tags
 Headings
 Paragraphs
 Inputs
 Labels
 Images
 Tables
 Lists
Continued…
 What are HTML Tags?
 The hidden keywords within a webpage that
define how our web browser must format &
display the content.
 Most tags have two parts an opening and
closing part, e.g; <html> is opening tag and
</html> is closing tag.
Headings
 Headings are defined with <h1> to <h6> tags.
 <h1> defines the most important heading while
<h6> is defined the least important heading
 <h1> should be used for main heading, followed
by <h2>, then the less important <h3> & so on…
Importance
 Search engines use the headings to index the
structure & content of your web pages.
 Users skim your pages by its headings, so it’s
important to use headings to show the document
structure.
Paragraphs
 The HTML <p> defines a paragraph.
 Never forget the end tag, else it might produce
unexpected results or errors.
Continued…
 HTML Line breaks:
 The HTML <br> element defines the line break.
Output:
Inputs
 There are many types of inputs from which text is
default.
 <input type=“value” />
 The value defines which type of data do you want
to insert.
 There are many types of data you can insert some
of them are from HTML5 but as we’re on to HTML
so we will only discuss them.
Input type=“?” Description
Text Default, defines a single-line text field.
Checkbox Defines a checkbox
Password Defines a password field.
File Defines a file-select field & a “Browse…”
button
Image Defines an image as the submit button
Button Defines a clickable button
Submit Defines a submit button
Hidden Defines a hidden input field
Radio Defines a radio button
Reset Defines a reset button
Labels
 The <label> tag defines a label for an <input>
element.
 The <label> element provides a usability
improvement for mouse users, because if the user
clicks on the text within the <label> element, it
toggles the control.
 The for attribute of the <label> tag should be
equal to the id attribute of the related element to
bind them together.
Images
 The <img> tag defines an image in an HTML page.
 The <img> tag has two required attributes; src &
alt.
 src: defines the url (or path) of the image
 alt: specifies an alternate text for an image
 Where some common attributes are height, width,
border etc.
Table
 The <table> tag defines an HTML table.
 An HTML table consists of the <table>
element and one or more <tr>, <th> & <td>
elements.
 More complex HTML table may also include
<caption>, <tbody>, <col>, <colgroup>,
<thead> & <tfoot>
Tags Description
<tr> Defines a table row
<th> Defines a table header
<td> Defines a table cell
<tbody> Used to group the body content in an
HTML table
<thead> Used to group header content in an HTML
table
<tfoot> Used to group footer content in an HTML
table
<caption> Defines a table caption
<col> Specifies column properties for each
column within a <colgroup> element
<colgroup> Specifies a group of one or more
columns in a table for formatting
Example
Lists
 There are two types of lists.
 Ordered Lists
 Unordered Lists.
 Definition Lists
Ordered Lists
 If you are required to put your items in a
numbered list instead of bulleted, then HTML
ordered list will be used. This list is created by using
<ol> tag.
Example
Unordered Lists
 A collection of related items that have no special
order or sequence. This list is created by using
HTML <ul> tag. Each item in the list is marked with
a bullet.
Example
Definition Lists
 HTML and XHTML supports a list style which is called
definition lists where entries are listed like in a
dictionary or encyclopedia. The definition list is the
ideal way to present a glossary, list of terms, or
other name/value list.
 Definition list makes use of the following three tags:
 <dl> - Defines the start of the list
 <dt> - A term
 <dd> - Term definition
 </dl> - Defines the end of the list
Example
HTML Elements
 An HTML element is defined by a starting tag. If the
element contains any content it ends with a
closing tag. Example:
Start Tag Content End Tag
<p> Paragraph
content
</p>
<h1> Heading content </h1>
<div> Division content </div>
<br />
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.
 Attributes consist of two parts: name & value
 Name is the property you want to set.
 Value is what you want the value of the property
to be set and always put within quotations.
Continued…
 For example; <img /> tag have two main
attributes src & alt
 <a></a> is a link tag whose main attribute is
href whose value is equal to any external link
or its link itself.
 While attributes like height, width, align etc
are common for all HTML elements.
Core Attributes
 The four core attributes that can be used on
majority of HTML elements(not all) 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
a Web page (or style sheet), you can use the id
attribute to distinguish between elements that
have the same name.
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

HTML 5 Topic 2
HTML 5 Topic 2HTML 5 Topic 2
HTML 5 Topic 2
 
Xhtml
XhtmlXhtml
Xhtml
 
HTML5 Topic 1
HTML5 Topic 1HTML5 Topic 1
HTML5 Topic 1
 
HTML language and all its tags .....
HTML language and all its tags .....HTML language and all its tags .....
HTML language and all its tags .....
 
Tm 1st quarter - 1st meeting
Tm   1st quarter - 1st meetingTm   1st quarter - 1st meeting
Tm 1st quarter - 1st meeting
 
Web Design & Development - Session 4
Web Design & Development - Session 4Web Design & Development - Session 4
Web Design & Development - Session 4
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2
 
Html tutorials-infotech aus
Html tutorials-infotech ausHtml tutorials-infotech aus
Html tutorials-infotech aus
 
Web Design & Development - Session 3
Web Design & Development - Session 3Web Design & Development - Session 3
Web Design & Development - Session 3
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
 
HTML Walkthrough Internship Course
HTML Walkthrough Internship CourseHTML Walkthrough Internship Course
HTML Walkthrough Internship Course
 
Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
 
O9xml
O9xmlO9xml
O9xml
 
Dtd
DtdDtd
Dtd
 
Html
HtmlHtml
Html
 
Document Type Definition
Document Type DefinitionDocument Type Definition
Document Type Definition
 
Html
HtmlHtml
Html
 
Document type definition
Document type definitionDocument type definition
Document type definition
 
Document Type Definitions
Document Type DefinitionsDocument Type Definitions
Document Type Definitions
 

Ähnlich wie HTML - part 1

Ähnlich wie HTML - part 1 (20)

Html
HtmlHtml
Html
 
Higher Computing Science HTML
Higher Computing Science HTMLHigher Computing Science HTML
Higher Computing Science HTML
 
Basic tags in html
Basic tags in htmlBasic tags in html
Basic tags in html
 
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
 
Final by smit parekh
Final  by smit  parekhFinal  by smit  parekh
Final by smit parekh
 
2 INTRO TO HTML.pptx
2 INTRO TO HTML.pptx2 INTRO TO HTML.pptx
2 INTRO TO HTML.pptx
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
 
html-basic.pdf
html-basic.pdfhtml-basic.pdf
html-basic.pdf
 
Learn HTML and know that you don.docx
Learn HTML and know that you don.docxLearn HTML and know that you don.docx
Learn HTML and know that you don.docx
 
Webithon Workshop
Webithon WorkshopWebithon Workshop
Webithon Workshop
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTML
 
INTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdfINTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdf
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Html
HtmlHtml
Html
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
HTML and CSS Basics
HTML and CSS BasicsHTML and CSS Basics
HTML and CSS Basics
 
Html basic
Html basicHtml basic
Html basic
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
HTML - LinkedIn
 

Kürzlich hochgeladen

Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024eCommerce Institute
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxmohammadalnahdi22
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsaqsarehman5055
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMoumonDas2
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024eCommerce Institute
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 

Kürzlich hochgeladen (20)

Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 

HTML - part 1

  • 2. Contents  HTML introduction  HTML page structure  HTML Basics  HTML Tags  HTML Elements  HTML Attributes
  • 3. HTML Introduction  HTML stands for Hyper Text Markup Language  HTML describes the structure of Web pages using markup  HTML elements are building blocks of HTML pages  HTML elements are represented by tags
  • 4. What is markup?  Markup is also known as HTML tags.
  • 5. Example  <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
  • 7. HTML Basics  All HTML documents must start with a document type declaration: <!DOCTYPE html>.  The HTML document itself begins with <html> and ends with </html>.  The visible part of the HTML document is between <body> and </body>.
  • 8. HTML Tags  Headings  Paragraphs  Inputs  Labels  Images  Tables  Lists
  • 9. Continued…  What are HTML Tags?  The hidden keywords within a webpage that define how our web browser must format & display the content.  Most tags have two parts an opening and closing part, e.g; <html> is opening tag and </html> is closing tag.
  • 10. Headings  Headings are defined with <h1> to <h6> tags.  <h1> defines the most important heading while <h6> is defined the least important heading  <h1> should be used for main heading, followed by <h2>, then the less important <h3> & so on…
  • 11. Importance  Search engines use the headings to index the structure & content of your web pages.  Users skim your pages by its headings, so it’s important to use headings to show the document structure.
  • 12. Paragraphs  The HTML <p> defines a paragraph.  Never forget the end tag, else it might produce unexpected results or errors.
  • 13. Continued…  HTML Line breaks:  The HTML <br> element defines the line break. Output:
  • 14. Inputs  There are many types of inputs from which text is default.  <input type=“value” />  The value defines which type of data do you want to insert.  There are many types of data you can insert some of them are from HTML5 but as we’re on to HTML so we will only discuss them.
  • 15. Input type=“?” Description Text Default, defines a single-line text field. Checkbox Defines a checkbox Password Defines a password field. File Defines a file-select field & a “Browse…” button Image Defines an image as the submit button Button Defines a clickable button Submit Defines a submit button Hidden Defines a hidden input field Radio Defines a radio button Reset Defines a reset button
  • 16. Labels  The <label> tag defines a label for an <input> element.  The <label> element provides a usability improvement for mouse users, because if the user clicks on the text within the <label> element, it toggles the control.  The for attribute of the <label> tag should be equal to the id attribute of the related element to bind them together.
  • 17. Images  The <img> tag defines an image in an HTML page.  The <img> tag has two required attributes; src & alt.  src: defines the url (or path) of the image  alt: specifies an alternate text for an image  Where some common attributes are height, width, border etc.
  • 18. Table  The <table> tag defines an HTML table.  An HTML table consists of the <table> element and one or more <tr>, <th> & <td> elements.  More complex HTML table may also include <caption>, <tbody>, <col>, <colgroup>, <thead> & <tfoot>
  • 19. Tags Description <tr> Defines a table row <th> Defines a table header <td> Defines a table cell <tbody> Used to group the body content in an HTML table <thead> Used to group header content in an HTML table <tfoot> Used to group footer content in an HTML table <caption> Defines a table caption <col> Specifies column properties for each column within a <colgroup> element <colgroup> Specifies a group of one or more columns in a table for formatting
  • 21. Lists  There are two types of lists.  Ordered Lists  Unordered Lists.  Definition Lists
  • 22. Ordered Lists  If you are required to put your items in a numbered list instead of bulleted, then HTML ordered list will be used. This list is created by using <ol> tag.
  • 24. Unordered Lists  A collection of related items that have no special order or sequence. This list is created by using HTML <ul> tag. Each item in the list is marked with a bullet.
  • 26. Definition Lists  HTML and XHTML supports a list style which is called definition lists where entries are listed like in a dictionary or encyclopedia. The definition list is the ideal way to present a glossary, list of terms, or other name/value list.  Definition list makes use of the following three tags:  <dl> - Defines the start of the list  <dt> - A term  <dd> - Term definition  </dl> - Defines the end of the list
  • 28. HTML Elements  An HTML element is defined by a starting tag. If the element contains any content it ends with a closing tag. Example: Start Tag Content End Tag <p> Paragraph content </p> <h1> Heading content </h1> <div> Division content </div> <br />
  • 29. Continued…  <start tag> … content … </end tag> Element
  • 30. 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.  Attributes consist of two parts: name & value  Name is the property you want to set.  Value is what you want the value of the property to be set and always put within quotations.
  • 31. Continued…  For example; <img /> tag have two main attributes src & alt  <a></a> is a link tag whose main attribute is href whose value is equal to any external link or its link itself.  While attributes like height, width, align etc are common for all HTML elements.
  • 32. Core Attributes  The four core attributes that can be used on majority of HTML elements(not all) are:  Id  Class  Title  Style
  • 33. 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 a Web page (or style sheet), you can use the id attribute to distinguish between elements that have the same name.
  • 35. 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.
  • 36. 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.
  • 37. Style Attribute  The style attribute allows you to specify Cascading Style Sheet (CSS) rules within the element.
  • 38. 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