SlideShare a Scribd company logo
1 of 7
Download to read offline
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
1
Interactive Media Center
http://library.albany.edu/imc/
HTML & XHTML Tag Quick Reference
This reference notes some of the most commonly used HTML and XHTML tags. It is not, nor is it intended to
be, a comprehensive list of available tags. Details regarding the proper use of XHTML are at the end of this
document.
Basic Document Tags
What It Is What It Does
<html></html> Indicates the start and end of an HTML Document
<head></head>
Defines the portion of the document that contains essential formatting information. The
material in the head is invisible.
<body></body> Defines the portion of the document that contains the visible information.
Body Attributes
Not supported in HTML5. Use Cascading Style Sheets.
What It Is What It Does
<body bgcolor=?>
Specifies the background color
Not supported in HTML5. Use Cascading Style Sheets.
<body text=?>
Specifies the text color
Not supported in HTML5. Use Cascading Style Sheets.
<body link=?>
Specifies the color of unfollowed links.
Not supported in HTML5. Use Cascading Style Sheets.
<body vlink=?>
Specifies the color of followed links.
Not supported in HTML5. Use Cascading Style Sheets.
<body alink=?>
Specifies the color of links when they are clicked.
Not supported in HTML5. Use Cascading Style Sheets.
NOTE: Body attributes may be combined within the body tag. Example:
<body bgcolor="#FFFFFF" text="#000000" link="#0000CC" vlink="#33CC00" alink="#FF0000">
Not supported in HTML5. Use Cascading Style Sheets.
Text Tags
What It Is What It Does
<hl></hl>,<h2></h2>,
<h3></h3>,<h4></h4>,
<h5></h5>,<h6></h6>
The heading tags indicate the importance of a heading ranging from the most important,
h1, to the least important, h6. These specifications are intended to denote the
importance data below the heading.
<tt></tt> Specifies a typewriter or teletype-like text.
<em></em>
Creates an emphasis on text that is rendered usually as italics, but sometimes as bold
depending on the browser.
<strong></strong>
Creates an emphasis on text that is usually rendered as bold, but sometimes as italics
depending on the browser.
<font size=?></font>
Specifies the font size from 1 to 7. 1 is the smallest, 7 the largest, and 3 is generally the
default size.
The font tag is not supported in HTML5. Use Cascading Style Sheets.
<font color=?></font>
Specifies font color.
The font tag is not supported in HTML5. Use Cascading Style Sheets.
NOTE: Font attributes may be
combined within the font tag.
Example:
<font size="4"
NOTE: The font tag is not supported in HTML5. Use Cascading Style Sheets.
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
2
Interactive Media Center
http://library.albany.edu/imc/
color="#33FF00">Example of
combined font attributes. </font>
Common Formatting Tags
What It Is
(HTML 4.0 & Earlier)
What It Is
(XHTML & HTML5)
What It Does
<p></p> Same Defines a paragraph.
<p align=?> Same Defines paragraph alignment left, right, or center.
<br> Same Inserts a line break.
<blockquote></blockquote>
Same Defines a block quote and indents text from both
sides. Usually with some extra space above and
below.
<ol></ol> Same Defines the beginning and end of an ordered list.
<ul></ul> Same Defines the beginning and end of an unordered list.
<li></li>
Same Defines the beginning and end of a line within a list.
Start a line with a number in an ordered list, and with
a bullet in an unordered list.
Image Tags
What It Is (HTML) What It Is (XHTML) What It Does
<img src="name"> <img src="name" /> Places and image.
<img src="name" align=?> <img src="name" align=? />
Specifies the alignment of an image; left, right, center;
bottom, top, middle
<img src="name" border=?>
<img src="name" border=?
/>
Specifies a border around and image.
<img src”=name” alt=”name”>
<img src”=name” alt=”name”
/>
Specifies the alternative label for an image. This is
especially important for use nongraphical browsers.
NOTE: Attributes within the img tag may be combined.
Example in HTML:
<img src="images/fisherman.jpg" width="209" height="214" alt="Our Founder">
Example in XHTML:
<img src="images/fisherman.jpg" width="209" height="214" alt="Our Founder" />
Horizontal Rule Tags
What It Is (HTML) What It Is (XHTML) What It Does
<hr> <hr /> Specifies the start of a horizontal rule.
<hr size=?> <hr size=? /> Specifies the height of a horizontal rule.
<hr noshade> <hr noshade />
States that the horizontal rule should have no shade.
NOTE: Attributes within the horizontal rule tag may be combined.
Example in HTML: <hr noshade width="75%" size="4">
Example in XHTML: <hr noshade width="75%" size="4" />
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
3
Interactive Media Center
http://library.albany.edu/imc/
Table Tags
What It Is What It Does
<table></table> Specifies the beginning and end of a table.
<tr></tr> Specifies the beginning and end of a table row.
<td></td> Specifies the beginning and end of a table cell.
<th></th> Defines a table header. A normal cell with text that is bold and
centered.
<table border=#> Specifies the size of the border around a table and cells within the
table.
<table cellspacing=#> Specifies the space between cells.
<table cellpadding=#> Specifies the amount of space between the border of a cell and the
items within the cell.
<table width=”?”> Specifies the width of a table in either pixels or percent.
<tr align=?> Specifies the alignment of contents in a row of cells as either left,
right, or center.
<td align=?> Specifies the alignment of contents in a cell as either left, right, or
center.
<tr valign=?> Specifies the vertical alignment of contents in a row of cells as either
top, bottom, or middle.
<td valign=?> Specifies the vertical alignment of contents in cell as either top,
bottom, or middle.
<td colspan=#> Specifies the number of columns a cell will span.
<td rowspan=#> Specifies the number of rows a cell will span.
<td nowrap> Stops text from automatically line wrapping.
XHTML can be thought of as an upgraded and stricter version of HTML 4.01, while HTML 5 is an expansion
and clarification of the markup language for the Web. Neither XHTML nor HTML 5 is particularly difficult to
write. However, there are some important techniques to writing properly formed code. There are some simple
rules that must be followed. The most important rules are:
• Tags must all be in lower case.
• Elements must be nested correctly.
• Tag elements must be closed.
• Documents must be well-formed
Examples of lower case rule:
<STRONG>This is incorrect.</STRONG>
<strong>This is correct.</strong>
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
4
Interactive Media Center
http://library.albany.edu/imc/
Examples of the nesting rule:
<strong><em>This is incorrect nesting.</strong><em>
<strong><em>This is correct nesting.</em></strong>
Examples of the closed tag rule:
This horizontal rule tag is not closed- <hr>
This horizontal rule tag is closed- <hr />
This image tag is not closed- <img source=”/images/picture.jpg” alt=”Cows in a pasture”>
This image tag is properly closed- <img source=”/images/picture.jpg” alt=”Cows in a pasture” />
Examples of the well-formed document rule:
XHTML documents must have the proper structure. This means all components must be within the
opening and closing HTML tags, <html></html>. Internal elements must be correctly nested and
located properly. The basic components and structure of an XHTML document are-
<html>
<head>
</head>
<body>
</body>
</html>
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
5
Interactive Media Center
http://library.albany.edu/imc/
XHTML/HTML 5 Syntax Rules
XHTML and HTML 5 require that some basic rules of syntax be followed. As with the tag rules noted above,
XHTML and HTML 5 syntax is not much more difficult that correctly formed HTML 4.0. These rules are,
however, much stricter and must not be violated. These rules follow.
• Attributes must be quoted.
• The Name attribute is replaced by the ID attribute
• Attribute shorthand must not be used.
• DOCTYPE statement must be used. (The DOCTYPE statement is part of Document Type Definition,
DTD, and is used to specify which syntax is used in the Web page.)
Examples of the quoted attribute rule:
This is incorrect- <table width=75% bgcolor=ff0000>
This is correct- <table width-“75” bgcolor=”ff0000”>
Examples of the Name attribute replacement rule:
This is incorrect- <img src=”/images/cows.jpg” name=”photo12” />
This is the correct substitution- <img src=”/images/cows.jpg” id=”photo12” />
Examples of the no shorthand rule:
This is an example of improper shorthand- <input checked>
This is the same tag correctly written without shorthand- <input checked=”checked”
Examples of DOCTYPE statements:
Invalid “old-style” DOCTYPE statement:
<html>
<head>
<title>This is a page without a statement</title>
</head>
<body>
</body>
</html>
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
6
Interactive Media Center
http://library.albany.edu/imc/
XHTML DOCTYPE statement:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Example of a page with a DOCTYPE statement</title>
</head>
<body>
</body>
</html>
HTML 5 DOCTYPE statement:
<!DOCTYPE HTML>
<html>
<head>
<title>Example of a page with a DOCTYPE statement</title>
</head>
<body>
</body>
</html>
Note that the DOCTYPE statement goes ahead of the opening HTML tag, <html>. The statement is not part of
the HTML document and does not have a closing tag. It is used to tell a browser how to render the document.
There are three XHTML DOCTYPE statements.
Statement used to create clutter-free pages that must follow rules exactly when Cascading Style Sheets are used:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Statement used when HTML presentational features are present and when it is desirable to support older
browsers that do not fully understand Cascading Style Sheets:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Roger Lipera 011/12 v5 Interactive Media Center
rlipera@albany.edu http://library.albany.edu/imc/
This and other free handouts are available on our Web site.
7
Interactive Media Center
http://library.albany.edu/imc/
Statement used when frames are incorporated into the design of the page (note that frames are an obsolete
design technique and are not used in modern page designs):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
HTML5 has only the one DOCTYPE statement noted above.
About HTML 5
At the time of this writing, HTML 5 remains in a non-official state. Many Web page builders are starting to
incorporate elements of HTML 5 into their projects. All current browsers support some HTML 5 components,
but no browser supports everything outlined in the HTML 5 rules. One primary reason for this is that the HTML
5 rules are being constantly updated as problems are worked out.
HTML 5 has many new tags. It is necessary to understand that the purpose of HTML is to specify what
something is. For instance, HTML identifies a page element as a link, a list, a paragraph, or some other sort of
object. Presentation is controlled by Cascading Style Sheets. In other words, HTML specifies that an object is,
for instance, a link, but not what color the link is.
HTML 5 expands the list of tags by providing more options for identification. It is now possible to identify
headers, footers, sections, audio, video, and much more. The expansion of HTML tags and the ability of
browsers to understand these new tags will improve the usability of the World Wide Web and result in new
methods of presentation with better results. It also means that we can expect less variation in the appearance and
operation of Web pages when viewed with different browsers and operating systems.

More Related Content

What's hot (20)

Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML Introduction
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTML
 
Html
HtmlHtml
Html
 
php 1
php 1php 1
php 1
 
Computer application html
Computer application htmlComputer application html
Computer application html
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
HTML
HTMLHTML
HTML
 
Html
HtmlHtml
Html
 
Html xhtml tag-sheet
Html xhtml tag-sheetHtml xhtml tag-sheet
Html xhtml tag-sheet
 
Html
HtmlHtml
Html
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
 
Html
HtmlHtml
Html
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 
Session4
Session4Session4
Session4
 
Html notes
Html notesHtml notes
Html notes
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 

Similar to Html xhtml tag-sheet

Similar to Html xhtml tag-sheet (20)

Html xhtml tag-sheet
Html xhtml tag-sheetHtml xhtml tag-sheet
Html xhtml tag-sheet
 
Html introduction
Html introductionHtml introduction
Html introduction
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
HTML Basics.pdf
HTML Basics.pdfHTML Basics.pdf
HTML Basics.pdf
 
Xhtml
XhtmlXhtml
Xhtml
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
Class2
Class2Class2
Class2
 
XHTML and CSS
XHTML and CSS XHTML and CSS
XHTML and CSS
 
BITM3730Week3.pptx
BITM3730Week3.pptxBITM3730Week3.pptx
BITM3730Week3.pptx
 
Lecture 4 - Adding XTHML for the Web
Lecture  4 - Adding XTHML for the WebLecture  4 - Adding XTHML for the Web
Lecture 4 - Adding XTHML for the Web
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
Html
HtmlHtml
Html
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Web technologies-course 02.pptx
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptx
 
HTML Presentation
HTML Presentation HTML Presentation
HTML Presentation
 
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvddhtmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
 
htmlnotes Which tells about all the basic
htmlnotes Which tells about all the basichtmlnotes Which tells about all the basic
htmlnotes Which tells about all the basic
 
Html presentation
Html presentationHtml presentation
Html presentation
 

More from Daniel Downs

Developing a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDeveloping a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDaniel Downs
 
Module11: Creating A External Style Sheet and Creating A Gallery
Module11: Creating A External Style Sheet and Creating A GalleryModule11: Creating A External Style Sheet and Creating A Gallery
Module11: Creating A External Style Sheet and Creating A GalleryDaniel Downs
 
Seo continued page 2
Seo continued page 2Seo continued page 2
Seo continued page 2Daniel Downs
 
Module 10search engine optimization
Module 10search engine optimizationModule 10search engine optimization
Module 10search engine optimizationDaniel Downs
 
Ipad quick-reference-2
Ipad quick-reference-2Ipad quick-reference-2
Ipad quick-reference-2Daniel Downs
 
Index of jquery template 2 Minuteman Summer Web Dev.
Index of jquery template 2 Minuteman Summer Web Dev.Index of jquery template 2 Minuteman Summer Web Dev.
Index of jquery template 2 Minuteman Summer Web Dev.Daniel Downs
 
Jquery template 1 3 pages
Jquery template 1 3 pagesJquery template 1 3 pages
Jquery template 1 3 pagesDaniel Downs
 
Module6 htmlcss helpfulcodeandwebsites
Module6 htmlcss helpfulcodeandwebsitesModule6 htmlcss helpfulcodeandwebsites
Module6 htmlcss helpfulcodeandwebsitesDaniel Downs
 
Module 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsModule 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsDaniel Downs
 
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington Ma
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington MaModule 3 Progress Codes Web Design Daniel Downs Minuteman Lexington Ma
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington MaDaniel Downs
 
Module 2 lexington minuteman web development basic layout template
Module 2  lexington minuteman web development basic layout templateModule 2  lexington minuteman web development basic layout template
Module 2 lexington minuteman web development basic layout templateDaniel Downs
 
Module 1 Web design & Development Lexington Minuteman
Module 1 Web design & Development Lexington MinutemanModule 1 Web design & Development Lexington Minuteman
Module 1 Web design & Development Lexington MinutemanDaniel Downs
 
App research project
App research projectApp research project
App research projectDaniel Downs
 
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...Daniel Downs
 
Blogger custom domain on go daddy blogger widgets
Blogger custom domain on go daddy   blogger widgetsBlogger custom domain on go daddy   blogger widgets
Blogger custom domain on go daddy blogger widgetsDaniel Downs
 
Outline for action research prospectus
Outline for action research prospectusOutline for action research prospectus
Outline for action research prospectusDaniel Downs
 
You have decided to go off on your own as a freelance webdesigner
You have decided to go off on your own as a freelance webdesignerYou have decided to go off on your own as a freelance webdesigner
You have decided to go off on your own as a freelance webdesignerDaniel Downs
 
Making a basicappinflash (1)
Making a basicappinflash (1)Making a basicappinflash (1)
Making a basicappinflash (1)Daniel Downs
 
Daniel Downs Technology Portfolio Final May 2013 final (1)
Daniel Downs Technology Portfolio Final May 2013 final (1)Daniel Downs Technology Portfolio Final May 2013 final (1)
Daniel Downs Technology Portfolio Final May 2013 final (1)Daniel Downs
 
Web design 1& 2 lesson outline
Web design 1& 2 lesson outlineWeb design 1& 2 lesson outline
Web design 1& 2 lesson outlineDaniel Downs
 

More from Daniel Downs (20)

Developing a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authenticDeveloping a mobile application curriculum which empowers authentic
Developing a mobile application curriculum which empowers authentic
 
Module11: Creating A External Style Sheet and Creating A Gallery
Module11: Creating A External Style Sheet and Creating A GalleryModule11: Creating A External Style Sheet and Creating A Gallery
Module11: Creating A External Style Sheet and Creating A Gallery
 
Seo continued page 2
Seo continued page 2Seo continued page 2
Seo continued page 2
 
Module 10search engine optimization
Module 10search engine optimizationModule 10search engine optimization
Module 10search engine optimization
 
Ipad quick-reference-2
Ipad quick-reference-2Ipad quick-reference-2
Ipad quick-reference-2
 
Index of jquery template 2 Minuteman Summer Web Dev.
Index of jquery template 2 Minuteman Summer Web Dev.Index of jquery template 2 Minuteman Summer Web Dev.
Index of jquery template 2 Minuteman Summer Web Dev.
 
Jquery template 1 3 pages
Jquery template 1 3 pagesJquery template 1 3 pages
Jquery template 1 3 pages
 
Module6 htmlcss helpfulcodeandwebsites
Module6 htmlcss helpfulcodeandwebsitesModule6 htmlcss helpfulcodeandwebsites
Module6 htmlcss helpfulcodeandwebsites
 
Module 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsModule 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel Downs
 
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington Ma
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington MaModule 3 Progress Codes Web Design Daniel Downs Minuteman Lexington Ma
Module 3 Progress Codes Web Design Daniel Downs Minuteman Lexington Ma
 
Module 2 lexington minuteman web development basic layout template
Module 2  lexington minuteman web development basic layout templateModule 2  lexington minuteman web development basic layout template
Module 2 lexington minuteman web development basic layout template
 
Module 1 Web design & Development Lexington Minuteman
Module 1 Web design & Development Lexington MinutemanModule 1 Web design & Development Lexington Minuteman
Module 1 Web design & Development Lexington Minuteman
 
App research project
App research projectApp research project
App research project
 
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...
Daniel Downs: Student Experiences In A Project Based Learning Technology Curr...
 
Blogger custom domain on go daddy blogger widgets
Blogger custom domain on go daddy   blogger widgetsBlogger custom domain on go daddy   blogger widgets
Blogger custom domain on go daddy blogger widgets
 
Outline for action research prospectus
Outline for action research prospectusOutline for action research prospectus
Outline for action research prospectus
 
You have decided to go off on your own as a freelance webdesigner
You have decided to go off on your own as a freelance webdesignerYou have decided to go off on your own as a freelance webdesigner
You have decided to go off on your own as a freelance webdesigner
 
Making a basicappinflash (1)
Making a basicappinflash (1)Making a basicappinflash (1)
Making a basicappinflash (1)
 
Daniel Downs Technology Portfolio Final May 2013 final (1)
Daniel Downs Technology Portfolio Final May 2013 final (1)Daniel Downs Technology Portfolio Final May 2013 final (1)
Daniel Downs Technology Portfolio Final May 2013 final (1)
 
Web design 1& 2 lesson outline
Web design 1& 2 lesson outlineWeb design 1& 2 lesson outline
Web design 1& 2 lesson outline
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Html xhtml tag-sheet

  • 1. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 1 Interactive Media Center http://library.albany.edu/imc/ HTML & XHTML Tag Quick Reference This reference notes some of the most commonly used HTML and XHTML tags. It is not, nor is it intended to be, a comprehensive list of available tags. Details regarding the proper use of XHTML are at the end of this document. Basic Document Tags What It Is What It Does <html></html> Indicates the start and end of an HTML Document <head></head> Defines the portion of the document that contains essential formatting information. The material in the head is invisible. <body></body> Defines the portion of the document that contains the visible information. Body Attributes Not supported in HTML5. Use Cascading Style Sheets. What It Is What It Does <body bgcolor=?> Specifies the background color Not supported in HTML5. Use Cascading Style Sheets. <body text=?> Specifies the text color Not supported in HTML5. Use Cascading Style Sheets. <body link=?> Specifies the color of unfollowed links. Not supported in HTML5. Use Cascading Style Sheets. <body vlink=?> Specifies the color of followed links. Not supported in HTML5. Use Cascading Style Sheets. <body alink=?> Specifies the color of links when they are clicked. Not supported in HTML5. Use Cascading Style Sheets. NOTE: Body attributes may be combined within the body tag. Example: <body bgcolor="#FFFFFF" text="#000000" link="#0000CC" vlink="#33CC00" alink="#FF0000"> Not supported in HTML5. Use Cascading Style Sheets. Text Tags What It Is What It Does <hl></hl>,<h2></h2>, <h3></h3>,<h4></h4>, <h5></h5>,<h6></h6> The heading tags indicate the importance of a heading ranging from the most important, h1, to the least important, h6. These specifications are intended to denote the importance data below the heading. <tt></tt> Specifies a typewriter or teletype-like text. <em></em> Creates an emphasis on text that is rendered usually as italics, but sometimes as bold depending on the browser. <strong></strong> Creates an emphasis on text that is usually rendered as bold, but sometimes as italics depending on the browser. <font size=?></font> Specifies the font size from 1 to 7. 1 is the smallest, 7 the largest, and 3 is generally the default size. The font tag is not supported in HTML5. Use Cascading Style Sheets. <font color=?></font> Specifies font color. The font tag is not supported in HTML5. Use Cascading Style Sheets. NOTE: Font attributes may be combined within the font tag. Example: <font size="4" NOTE: The font tag is not supported in HTML5. Use Cascading Style Sheets.
  • 2. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 2 Interactive Media Center http://library.albany.edu/imc/ color="#33FF00">Example of combined font attributes. </font> Common Formatting Tags What It Is (HTML 4.0 & Earlier) What It Is (XHTML & HTML5) What It Does <p></p> Same Defines a paragraph. <p align=?> Same Defines paragraph alignment left, right, or center. <br> Same Inserts a line break. <blockquote></blockquote> Same Defines a block quote and indents text from both sides. Usually with some extra space above and below. <ol></ol> Same Defines the beginning and end of an ordered list. <ul></ul> Same Defines the beginning and end of an unordered list. <li></li> Same Defines the beginning and end of a line within a list. Start a line with a number in an ordered list, and with a bullet in an unordered list. Image Tags What It Is (HTML) What It Is (XHTML) What It Does <img src="name"> <img src="name" /> Places and image. <img src="name" align=?> <img src="name" align=? /> Specifies the alignment of an image; left, right, center; bottom, top, middle <img src="name" border=?> <img src="name" border=? /> Specifies a border around and image. <img src”=name” alt=”name”> <img src”=name” alt=”name” /> Specifies the alternative label for an image. This is especially important for use nongraphical browsers. NOTE: Attributes within the img tag may be combined. Example in HTML: <img src="images/fisherman.jpg" width="209" height="214" alt="Our Founder"> Example in XHTML: <img src="images/fisherman.jpg" width="209" height="214" alt="Our Founder" /> Horizontal Rule Tags What It Is (HTML) What It Is (XHTML) What It Does <hr> <hr /> Specifies the start of a horizontal rule. <hr size=?> <hr size=? /> Specifies the height of a horizontal rule. <hr noshade> <hr noshade /> States that the horizontal rule should have no shade. NOTE: Attributes within the horizontal rule tag may be combined. Example in HTML: <hr noshade width="75%" size="4"> Example in XHTML: <hr noshade width="75%" size="4" />
  • 3. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 3 Interactive Media Center http://library.albany.edu/imc/ Table Tags What It Is What It Does <table></table> Specifies the beginning and end of a table. <tr></tr> Specifies the beginning and end of a table row. <td></td> Specifies the beginning and end of a table cell. <th></th> Defines a table header. A normal cell with text that is bold and centered. <table border=#> Specifies the size of the border around a table and cells within the table. <table cellspacing=#> Specifies the space between cells. <table cellpadding=#> Specifies the amount of space between the border of a cell and the items within the cell. <table width=”?”> Specifies the width of a table in either pixels or percent. <tr align=?> Specifies the alignment of contents in a row of cells as either left, right, or center. <td align=?> Specifies the alignment of contents in a cell as either left, right, or center. <tr valign=?> Specifies the vertical alignment of contents in a row of cells as either top, bottom, or middle. <td valign=?> Specifies the vertical alignment of contents in cell as either top, bottom, or middle. <td colspan=#> Specifies the number of columns a cell will span. <td rowspan=#> Specifies the number of rows a cell will span. <td nowrap> Stops text from automatically line wrapping. XHTML can be thought of as an upgraded and stricter version of HTML 4.01, while HTML 5 is an expansion and clarification of the markup language for the Web. Neither XHTML nor HTML 5 is particularly difficult to write. However, there are some important techniques to writing properly formed code. There are some simple rules that must be followed. The most important rules are: • Tags must all be in lower case. • Elements must be nested correctly. • Tag elements must be closed. • Documents must be well-formed Examples of lower case rule: <STRONG>This is incorrect.</STRONG> <strong>This is correct.</strong>
  • 4. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 4 Interactive Media Center http://library.albany.edu/imc/ Examples of the nesting rule: <strong><em>This is incorrect nesting.</strong><em> <strong><em>This is correct nesting.</em></strong> Examples of the closed tag rule: This horizontal rule tag is not closed- <hr> This horizontal rule tag is closed- <hr /> This image tag is not closed- <img source=”/images/picture.jpg” alt=”Cows in a pasture”> This image tag is properly closed- <img source=”/images/picture.jpg” alt=”Cows in a pasture” /> Examples of the well-formed document rule: XHTML documents must have the proper structure. This means all components must be within the opening and closing HTML tags, <html></html>. Internal elements must be correctly nested and located properly. The basic components and structure of an XHTML document are- <html> <head> </head> <body> </body> </html>
  • 5. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 5 Interactive Media Center http://library.albany.edu/imc/ XHTML/HTML 5 Syntax Rules XHTML and HTML 5 require that some basic rules of syntax be followed. As with the tag rules noted above, XHTML and HTML 5 syntax is not much more difficult that correctly formed HTML 4.0. These rules are, however, much stricter and must not be violated. These rules follow. • Attributes must be quoted. • The Name attribute is replaced by the ID attribute • Attribute shorthand must not be used. • DOCTYPE statement must be used. (The DOCTYPE statement is part of Document Type Definition, DTD, and is used to specify which syntax is used in the Web page.) Examples of the quoted attribute rule: This is incorrect- <table width=75% bgcolor=ff0000> This is correct- <table width-“75” bgcolor=”ff0000”> Examples of the Name attribute replacement rule: This is incorrect- <img src=”/images/cows.jpg” name=”photo12” /> This is the correct substitution- <img src=”/images/cows.jpg” id=”photo12” /> Examples of the no shorthand rule: This is an example of improper shorthand- <input checked> This is the same tag correctly written without shorthand- <input checked=”checked” Examples of DOCTYPE statements: Invalid “old-style” DOCTYPE statement: <html> <head> <title>This is a page without a statement</title> </head> <body> </body> </html>
  • 6. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 6 Interactive Media Center http://library.albany.edu/imc/ XHTML DOCTYPE statement: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Example of a page with a DOCTYPE statement</title> </head> <body> </body> </html> HTML 5 DOCTYPE statement: <!DOCTYPE HTML> <html> <head> <title>Example of a page with a DOCTYPE statement</title> </head> <body> </body> </html> Note that the DOCTYPE statement goes ahead of the opening HTML tag, <html>. The statement is not part of the HTML document and does not have a closing tag. It is used to tell a browser how to render the document. There are three XHTML DOCTYPE statements. Statement used to create clutter-free pages that must follow rules exactly when Cascading Style Sheets are used: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Statement used when HTML presentational features are present and when it is desirable to support older browsers that do not fully understand Cascading Style Sheets: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  • 7. Roger Lipera 011/12 v5 Interactive Media Center rlipera@albany.edu http://library.albany.edu/imc/ This and other free handouts are available on our Web site. 7 Interactive Media Center http://library.albany.edu/imc/ Statement used when frames are incorporated into the design of the page (note that frames are an obsolete design technique and are not used in modern page designs): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> HTML5 has only the one DOCTYPE statement noted above. About HTML 5 At the time of this writing, HTML 5 remains in a non-official state. Many Web page builders are starting to incorporate elements of HTML 5 into their projects. All current browsers support some HTML 5 components, but no browser supports everything outlined in the HTML 5 rules. One primary reason for this is that the HTML 5 rules are being constantly updated as problems are worked out. HTML 5 has many new tags. It is necessary to understand that the purpose of HTML is to specify what something is. For instance, HTML identifies a page element as a link, a list, a paragraph, or some other sort of object. Presentation is controlled by Cascading Style Sheets. In other words, HTML specifies that an object is, for instance, a link, but not what color the link is. HTML 5 expands the list of tags by providing more options for identification. It is now possible to identify headers, footers, sections, audio, video, and much more. The expansion of HTML tags and the ability of browsers to understand these new tags will improve the usability of the World Wide Web and result in new methods of presentation with better results. It also means that we can expect less variation in the appearance and operation of Web pages when viewed with different browsers and operating systems.