SlideShare ist ein Scribd-Unternehmen logo
1 von 14
www.afghanhost.af - info@afghanhost.af
Instructor: Mohammad Rafi Haidari25-May-2014
HTML (Day 3)
 Tables
 Blocks
 Layouts
HTML Tables
Tables are defined with the <table> tag.
A table is divided into rows with the <tr> tag. (tr stands for table row)
A row is divided into data cells with the <td> tag. (td stands for table data)
A row can also be divided into headings with the <th> tag. (th stands for table
heading)
The <td> elements are the data containers in the table.
The <td> elements can contain all sorts of HTML elements like text, images, lists,
other tables, etc.
The width of a table can be defined using CSS.
HTML Tables
<table>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
HTML Tables(Border)
Table with a Border Attribute
If you do not specify a border for the table, it will be displayed without
borders.
<table border="1" >
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
HTML Tables(Headings)
Table Headings
Table headings are defined with the <th> tag.
By default, all major browsers display table headings as bold and centered:
<table border="1" >
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Points</th>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
HTML Blocks
HTML <div> Element
The HTML <div> element is a block level element that can be used as a
container for grouping other HTML elements.
The <div> element has no special meaning. Except that, because it is a block
level element, the browser will display a line break before and after it.
When used together with CSS, the <div> element can be used to set style
attributes to large blocks of content.
Another common use of the <div> element, is for document layout. It replaces
the "old way" of defining layout using tables. Using <table> elements for
layout is not the correct use of <table> . The purpose of the <table> element is
to display tabular data.
<div style="color:gray">
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>
HTML Blocks
HTML <span> Element
The HTML <span> element is an inline element that can be used as a container
for text.
The <span> element has no special meaning.
When used together with CSS, the <span> element can be used to set style
attributes to parts of the text.
<p>My son has <span style="color:blue">blue</span> eyes.</p>
HTML Layouts
Most websites have put their content in multiple columns (formatted like a
magazine or newspaper).
Multiple columns are created by using <div> or <table> elements. CSS are
used to position elements, or to create backgrounds or colorful look for the
pages.
HTML Layouts - Using <div> Elements
The div element is a block level element used for grouping HTML elements.
The following example uses five div elements to create a multiple column
layout, creating the same result as in the previous example: (Next slide)
HTML Layouts
<html>
<body>
<div id="container" style="width:500px">
<div id="header" style="background-color:#FFA500;">
<h1 style="margin-bottom:0;">Main Title of Web Page</h1></div>
<div id="menu" style="background-
color:#FFD700;height:200px;width:100px;float:left;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript</div>
<div id="content" style="background-
color:#EEEEEE;height:200px;width:400px;float:left;">
Content goes here</div>
<div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
Copyright © W3Schools.com</div>
</div>
</body>
</html>
HTML Layouts
The HTML code above will produce the following result:
HTML Layouts
HTML Layouts - Using Tables
A simple way of creating layouts is by using the HTML <table> tag.
Multiple columns are created by using <div> or <table> elements. CSS are used to
position elements, or
The following example uses a table with 3 rows and 2 columns - the first and last row
spans both columns using the colspan attribute: to create backgrounds or colorful look
for the pages.
HTML Layouts
<html>
<body>
<table width="500">
<tr>
<td colspan="2" style="background-color:#FFA500;">
<h1>Main Title of Web Page</h1>
</td>
</tr>
<tr>
<td style="background-color:#FFD700;width:100px;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript
</td>
<td style="background-color:#EEEEEE;height:200px;width:400px;">Content goes here</td></tr>
<tr>
<td colspan="2" style="background-color:#FFA500;text-align:center;">Copyright ©
W3Schools.com</td></tr>
</table>
</body>
</html>
HTML Layouts
The HTML code above will produce the following result:
Html_Day_Three(W3Schools)

Weitere Àhnliche Inhalte

Was ist angesagt?

Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
Aarti P
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
 
Css introduction
Css introductionCss introduction
Css introduction
Sridhar P
 

Was ist angesagt? (20)

HTML Table
HTML TableHTML Table
HTML Table
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
Css
CssCss
Css
 
Css Basics
Css BasicsCss Basics
Css Basics
 
CSS in HTML
CSS in HTMLCSS in HTML
CSS in HTML
 
Html table tags
Html table tagsHtml table tags
Html table tags
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)
 
Html training slide
Html training slideHtml training slide
Html training slide
 
HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
CSS notes
CSS notesCSS notes
CSS notes
 
Lecture3
Lecture3Lecture3
Lecture3
 
Cascading Style Sheet | CSS
Cascading Style Sheet | CSSCascading Style Sheet | CSS
Cascading Style Sheet | CSS
 
Css introduction
Css introductionCss introduction
Css introduction
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 

Andere mochten auch

Historia juegos olimpicos
Historia juegos olimpicosHistoria juegos olimpicos
Historia juegos olimpicos
anagarridoaroz99
 
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžąàč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
sarwsw
 
Historia juegos olimpicos
Historia juegos olimpicosHistoria juegos olimpicos
Historia juegos olimpicos
anagarridoaroz99
 
Prevencions%20i%20lesions%2
Prevencions%20i%20lesions%2Prevencions%20i%20lesions%2
Prevencions%20i%20lesions%2
GuilleJackson123
 
Blog
BlogBlog
Blog
sarwsw
 

Andere mochten auch (17)

Historia juegos olimpicos
Historia juegos olimpicosHistoria juegos olimpicos
Historia juegos olimpicos
 
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžąàč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
àč€àžàžŁàž”àžĄàž±àž˜àžąàžĄàž›àž„àžČàžą
 
Ssrn id2587282
Ssrn id2587282Ssrn id2587282
Ssrn id2587282
 
K4
K4K4
K4
 
Đ—Đ°Ń…ĐžŃĐœĐžĐș ĐŁĐșŃ€Đ°Ń—ĐœĐž: Đ±Ń–Đ±Đ»Ń–ĐŸĐłŃ€Đ°Ń„Ń–Ń‡ĐœĐžĐč ŃĐżĐžŃĐŸĐș Đ»Ń–Ń‚Đ”Ń€Đ°Ń‚ŃƒŃ€Đž
Đ—Đ°Ń…ĐžŃĐœĐžĐș ĐŁĐșŃ€Đ°Ń—ĐœĐž: Đ±Ń–Đ±Đ»Ń–ĐŸĐłŃ€Đ°Ń„Ń–Ń‡ĐœĐžĐč ŃĐżĐžŃĐŸĐș Đ»Ń–Ń‚Đ”Ń€Đ°Ń‚ŃƒŃ€ĐžĐ—Đ°Ń…ĐžŃĐœĐžĐș ĐŁĐșŃ€Đ°Ń—ĐœĐž: Đ±Ń–Đ±Đ»Ń–ĐŸĐłŃ€Đ°Ń„Ń–Ń‡ĐœĐžĐč ŃĐżĐžŃĐŸĐș Đ»Ń–Ń‚Đ”Ń€Đ°Ń‚ŃƒŃ€Đž
Đ—Đ°Ń…ĐžŃĐœĐžĐș ĐŁĐșŃ€Đ°Ń—ĐœĐž: Đ±Ń–Đ±Đ»Ń–ĐŸĐłŃ€Đ°Ń„Ń–Ń‡ĐœĐžĐč ŃĐżĐžŃĐŸĐș Đ»Ń–Ń‚Đ”Ń€Đ°Ń‚ŃƒŃ€Đž
 
ĐŸŃ€ĐŸĐČŃ–ŃĐœĐžĐșĐž ĐœĐ°ŃˆĐŸŃ— ĐČĐŸĐ»Ń–. З Ń–ŃŃ‚ĐŸŃ€Ń–Ń— ĐłŃ–ĐŒĐœŃƒ ĐŁĐșŃ€Đ°Ń—ĐœĐž
ĐŸŃ€ĐŸĐČŃ–ŃĐœĐžĐșĐž ĐœĐ°ŃˆĐŸŃ— ĐČĐŸĐ»Ń–. З Ń–ŃŃ‚ĐŸŃ€Ń–Ń— ĐłŃ–ĐŒĐœŃƒ ĐŁĐșŃ€Đ°Ń—ĐœĐžĐŸŃ€ĐŸĐČŃ–ŃĐœĐžĐșĐž ĐœĐ°ŃˆĐŸŃ— ĐČĐŸĐ»Ń–. З Ń–ŃŃ‚ĐŸŃ€Ń–Ń— ĐłŃ–ĐŒĐœŃƒ ĐŁĐșŃ€Đ°Ń—ĐœĐž
ĐŸŃ€ĐŸĐČŃ–ŃĐœĐžĐșĐž ĐœĐ°ŃˆĐŸŃ— ĐČĐŸĐ»Ń–. З Ń–ŃŃ‚ĐŸŃ€Ń–Ń— ĐłŃ–ĐŒĐœŃƒ ĐŁĐșŃ€Đ°Ń—ĐœĐž
 
Us healthcare industry upload
Us healthcare industry uploadUs healthcare industry upload
Us healthcare industry upload
 
Research Paper
Research PaperResearch Paper
Research Paper
 
Historia juegos olimpicos
Historia juegos olimpicosHistoria juegos olimpicos
Historia juegos olimpicos
 
Pat5
Pat5Pat5
Pat5
 
Blog
BlogBlog
Blog
 
Prevencions%20i%20lesions%2
Prevencions%20i%20lesions%2Prevencions%20i%20lesions%2
Prevencions%20i%20lesions%2
 
Open Educational Resources: what is this all about?
Open Educational Resources: what is this all about?Open Educational Resources: what is this all about?
Open Educational Resources: what is this all about?
 
Đ—Đ°Ń€ŃƒĐ±Ń–Đ¶ĐœŃ– тĐČĐŸŃ€Đž юĐČŃ–Đ»ŃŃ€Đž 2015 Ń€ĐŸĐșу
Đ—Đ°Ń€ŃƒĐ±Ń–Đ¶ĐœŃ– тĐČĐŸŃ€Đž юĐČŃ–Đ»ŃŃ€Đž 2015 Ń€ĐŸĐșŃƒĐ—Đ°Ń€ŃƒĐ±Ń–Đ¶ĐœŃ– тĐČĐŸŃ€Đž юĐČŃ–Đ»ŃŃ€Đž 2015 Ń€ĐŸĐșу
Đ—Đ°Ń€ŃƒĐ±Ń–Đ¶ĐœŃ– тĐČĐŸŃ€Đž юĐČŃ–Đ»ŃŃ€Đž 2015 Ń€ĐŸĐșу
 
tugas 8
tugas 8tugas 8
tugas 8
 
Prevencionsilesions
PrevencionsilesionsPrevencionsilesions
Prevencionsilesions
 
Blog
BlogBlog
Blog
 

Ähnlich wie Html_Day_Three(W3Schools)

HTML Notes for new begginers for HTML CSS
HTML Notes for new begginers for HTML CSSHTML Notes for new begginers for HTML CSS
HTML Notes for new begginers for HTML CSS
RajChauhan226834
 
Web Design Basics: HTML Essentials for begginer
Web Design Basics: HTML Essentials for begginerWeb Design Basics: HTML Essentials for begginer
Web Design Basics: HTML Essentials for begginer
RajChauhan226834
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstc
cmcsubho
 

Ähnlich wie Html_Day_Three(W3Schools) (20)

Html Table
Html TableHtml Table
Html Table
 
Session on common html table
Session on common html tableSession on common html table
Session on common html table
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
belajar HTML 3
belajar HTML 3belajar HTML 3
belajar HTML 3
 
Html html html html html html html html html
Html html html html html html html html htmlHtml html html html html html html html html
Html html html html html html html html html
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
 
Html tables
Html tablesHtml tables
Html tables
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
HTML Notes for new begginers for HTML CSS
HTML Notes for new begginers for HTML CSSHTML Notes for new begginers for HTML CSS
HTML Notes for new begginers for HTML CSS
 
Web Design Basics: HTML Essentials for begginer
Web Design Basics: HTML Essentials for begginerWeb Design Basics: HTML Essentials for begginer
Web Design Basics: HTML Essentials for begginer
 
HTML Tables in Omeka
HTML Tables in OmekaHTML Tables in Omeka
HTML Tables in Omeka
 
Html 5
Html 5Html 5
Html 5
 
29042023.pptx
29042023.pptx29042023.pptx
29042023.pptx
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzlutsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
utsav1.pptxjxnclbshjdcn;kJDucbnsD>NVzljfbmlzl
 
Html
HtmlHtml
Html
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstc
 
HTML CODES
HTML CODESHTML CODES
HTML CODES
 

Mehr von Rafi Haidari

Mehr von Rafi Haidari (16)

Lecture9 web design and development
Lecture9 web design and developmentLecture9 web design and development
Lecture9 web design and development
 
Lecture8 web design and development
Lecture8 web design and developmentLecture8 web design and development
Lecture8 web design and development
 
Lecture7 web design and development
Lecture7 web design and developmentLecture7 web design and development
Lecture7 web design and development
 
Lecture6 web design and development
Lecture6 web design and developmentLecture6 web design and development
Lecture6 web design and development
 
Lecture5 web design and development
Lecture5 web design and developmentLecture5 web design and development
Lecture5 web design and development
 
Lecture3 web design and development
Lecture3 web design and developmentLecture3 web design and development
Lecture3 web design and development
 
Lecture2 web design and development
Lecture2 web design and developmentLecture2 web design and development
Lecture2 web design and development
 
Lecture1 Web Design and Development
Lecture1 Web Design and DevelopmentLecture1 Web Design and Development
Lecture1 Web Design and Development
 
Bootstrap day3
Bootstrap day3Bootstrap day3
Bootstrap day3
 
Bootstrap day2
Bootstrap day2Bootstrap day2
Bootstrap day2
 
Bootstrap day1
Bootstrap day1Bootstrap day1
Bootstrap day1
 
CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)
 
CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)
 
CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)CSS_Day_Three (W3schools)
CSS_Day_Three (W3schools)
 
Html_Day_One (W3Schools)
Html_Day_One (W3Schools)Html_Day_One (W3Schools)
Html_Day_One (W3Schools)
 
HTML_Day_Two(W3Schools)
HTML_Day_Two(W3Schools)HTML_Day_Two(W3Schools)
HTML_Day_Two(W3Schools)
 

KĂŒrzlich hochgeladen

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
 
+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@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

KĂŒrzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+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...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Html_Day_Three(W3Schools)

  • 1. www.afghanhost.af - info@afghanhost.af Instructor: Mohammad Rafi Haidari25-May-2014 HTML (Day 3)  Tables  Blocks  Layouts
  • 2. HTML Tables Tables are defined with the <table> tag. A table is divided into rows with the <tr> tag. (tr stands for table row) A row is divided into data cells with the <td> tag. (td stands for table data) A row can also be divided into headings with the <th> tag. (th stands for table heading) The <td> elements are the data containers in the table. The <td> elements can contain all sorts of HTML elements like text, images, lists, other tables, etc. The width of a table can be defined using CSS.
  • 4. HTML Tables(Border) Table with a Border Attribute If you do not specify a border for the table, it will be displayed without borders. <table border="1" > <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> </table>
  • 5. HTML Tables(Headings) Table Headings Table headings are defined with the <th> tag. By default, all major browsers display table headings as bold and centered: <table border="1" > <tr> <th>Firstname</th> <th>Lastname</th> <th>Points</th> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> </table>
  • 6. HTML Blocks HTML <div> Element The HTML <div> element is a block level element that can be used as a container for grouping other HTML elements. The <div> element has no special meaning. Except that, because it is a block level element, the browser will display a line break before and after it. When used together with CSS, the <div> element can be used to set style attributes to large blocks of content. Another common use of the <div> element, is for document layout. It replaces the "old way" of defining layout using tables. Using <table> elements for layout is not the correct use of <table> . The purpose of the <table> element is to display tabular data. <div style="color:gray"> <h3>This is a heading</h3> <p>This is a paragraph.</p> </div>
  • 7. HTML Blocks HTML <span> Element The HTML <span> element is an inline element that can be used as a container for text. The <span> element has no special meaning. When used together with CSS, the <span> element can be used to set style attributes to parts of the text. <p>My son has <span style="color:blue">blue</span> eyes.</p>
  • 8. HTML Layouts Most websites have put their content in multiple columns (formatted like a magazine or newspaper). Multiple columns are created by using <div> or <table> elements. CSS are used to position elements, or to create backgrounds or colorful look for the pages. HTML Layouts - Using <div> Elements The div element is a block level element used for grouping HTML elements. The following example uses five div elements to create a multiple column layout, creating the same result as in the previous example: (Next slide)
  • 9. HTML Layouts <html> <body> <div id="container" style="width:500px"> <div id="header" style="background-color:#FFA500;"> <h1 style="margin-bottom:0;">Main Title of Web Page</h1></div> <div id="menu" style="background- color:#FFD700;height:200px;width:100px;float:left;"> <b>Menu</b><br> HTML<br> CSS<br> JavaScript</div> <div id="content" style="background- color:#EEEEEE;height:200px;width:400px;float:left;"> Content goes here</div> <div id="footer" style="background-color:#FFA500;clear:both;text-align:center;"> Copyright © W3Schools.com</div> </div> </body> </html>
  • 10. HTML Layouts The HTML code above will produce the following result:
  • 11. HTML Layouts HTML Layouts - Using Tables A simple way of creating layouts is by using the HTML <table> tag. Multiple columns are created by using <div> or <table> elements. CSS are used to position elements, or The following example uses a table with 3 rows and 2 columns - the first and last row spans both columns using the colspan attribute: to create backgrounds or colorful look for the pages.
  • 12. HTML Layouts <html> <body> <table width="500"> <tr> <td colspan="2" style="background-color:#FFA500;"> <h1>Main Title of Web Page</h1> </td> </tr> <tr> <td style="background-color:#FFD700;width:100px;"> <b>Menu</b><br> HTML<br> CSS<br> JavaScript </td> <td style="background-color:#EEEEEE;height:200px;width:400px;">Content goes here</td></tr> <tr> <td colspan="2" style="background-color:#FFA500;text-align:center;">Copyright © W3Schools.com</td></tr> </table> </body> </html>
  • 13. HTML Layouts The HTML code above will produce the following result: