SlideShare a Scribd company logo
1 of 5
What arethe X HTML Elements?
• XHTML elements are HTML elements written as XML
XHTML Elements - Syntax Rules
• XHTML elements must be properly nested
• XHTML elements must always be closed
• XHTML elements must be in lowercase
• XHTML documents must have one root element
• XHTML Elements Must Always Be Closed
This is wrong:
<p>This is a paragraph
<p>This is another paragraph
 This is correct:
<p>This is a paragraph</p>
<p>This is another paragraph</p>
 XHTML Elements Must Be In
Lower Case
This is wrong:
<BODY>
<P>This is a paragraph</P>
</BODY>
This is correct:
<body>
<p>This is a paragraph</p>
</body>
 Empty Elements Must Also Be Closed
 This is wrong:
A break: <br>
A horizontal rule:<hr>
An image: <img src="happy.gif"alt="Happy face">
 This is correct:
A break: <br />
A horizontal rule:<hr />
An image: <img src="happy.gif"alt="Happy face" />
What arethe X HTML linebreak elements?
 Line break and tab elements can be used when you need a littlemore control over how the browser
renders the text. The <BR> element is used to force a linebreak.
• The <br /> tag defines a forced linebreak within an XHTML document.
What arethe horizontal ruleelements?
• Can be used to separatecontent in an HTML page.
• <hr> If this tag was used, something likethis
will appear in your HTML.
What arethe X HTML headings & subheadings?
• Tags that give your page structure and pull ittogether, givingit order & meaning.
<h1>Heading...</h1> Heading
<h2>Sub-Heading...</h2>
<h3>Sub-Heading...</h3>
<h4>Sub-Heading...</h4> Sub-
<h5>Sub-Heading...</h5> Headings
<h6>Sub-Heading...</h6>
What is HTML comments? Give its syntax.
• SinceHTML is officially an SGML application,the comment syntax used in HTML
documents is actually theSGML comment syntax.Unfortunately this syntax is a bit
unclear atfirst.
• The definition of an SGML comment is basically as follows:
A comment declaration starts with <!, followed by zero or more comments, followed by >. A comment starts and
ends with "--", and does not contain any occurrence of "--".
This means that the followingareall legal SGML comments:
 <!-- Hello -->
 <!-- Hello -- -- Hello-->
 <!---->
 <!------ Hello -->
 <!>
Summary of XHTML Basics:
 DOCTYPE must be specified first.
 All elements must be in lowercase.
 Each element must have a beginning and an end.
 Elements must be properly nested.
 White space doesn’t matter.
Description of the Basic Elements
DOCTYPE: This tells the browser what version of HTML or XHTML the document is using.
This should be before any tags in the web page. The most commonly used DOCTYPEs are
"strict" and "transitional".
<html> and </html>: These are the first and last html tags in your web page. They tell the
browser you are writing an HTML document.
<head> and </head>: The head tags surround all the special elements, such as CSS styling, that
do notget displayed directly in your web page. The head elements are always above the body
tags, just like a person’s head is on top of their body.
<body> and </body>: The body tags surround all of the content (text, images, links, tables, etc.)
that will be displayed in your web page. Each of these elements can be used only once per web
page.
What is a Web Page?
A web page is a file on a computer written in HTML format. HTML stands for Hyper Text
Markup Language. This computer file contains both web-specific code and also "content," which
is what actually gets displayed in the web page.
Content includes text, pictures, tables, links, lists, embedded video, embedded audio, etc. The
code will always include HTML elements, which define and organize the page. Most modern
web pages will also include formatting code known as CSS (Cascading Style Shee
What is the difference between my notepad file and my web page
file?
None, actually. They are the exact same file. HTML files (that end in .html or .htm) can be
displayed two different ways. If an html file is opened in a text editor, such as Notepad, the html
code displays. If an html file is opened in a browser (such as Internet Explorer or Firefox), the
code is interpreted by the browser and the content is displayed in the browser window as a web
page.
What is an HTML element?
An HTML element is a component of an HTML document. It is typically comprised of a start
tag, an end tag, and some web content in between the start and end tag. For example, the <a>
element places a link into a web page.
What is a tag?
A tag is an html "command" that tells the browser to perform some action. The start tag is
surrounded by brackets, such as <a> and the end tag looks the same but with an additional
forward slash, such as </a>. Most HTML elements have a start tag and a separate end tag.
What is an attribute?
Most tags can include attributes and attribute values, which further define what the browser
should display. For example, in the start tag <a href="page2.html">, the "href" is the attribute
being defined and the "page2.html" is the attribute value.
What is content?
Content is everything that is actually visible when a visitor views our web page. To our visitor,
none of the HTML or CSS code matters; they are interested only in the content. It is our job as
web designers to present that content to our visitors in the best way possible.
Summary of XHTML Basics:
DOCTYPE must be specified first.
All elements must be in lowercase.
Each element must have a beginning and an end.
Elements must be properly nested.
White space doesn’t matter.
What is XHTML?
XHTML is newer than the old HTML
XHTML has stricter rules and does not allow some elements formerly used in HTML
One benefit of using XHTML is that it helps make web pages look identical in different
browsers, such as Internet Explorer, Firefox, Safari, etc.
XHTML is used to define and organize the page content but not to format or style it.
Elements and Attributesand
XHTML Elements
<head> </head> The <head> element contains special information that does not
Necessarily show up on the web page.
<title> </title> The <title> element determines what text will display in the title bar of the
web browser.
<body> </body> The <body> element is where all the "content" of your web page
goesibutes Elements
What are the X HTML Elements?
XHTML elementsare HTML elementswrittenasXML
XHTML Elements- Syntax Rules
XHTML elementsmustbe properlynested
XHTML elementsmustalwaysbe closed
XHTML elementsmustbe in lowercase
XHTML documentsmusthave one root element
XHTML ElementsMust AlwaysBe Closed
Thisis wrong:
<p>This is a paragraph
<p>This is another paragraph
 This is correct:
<p>This is a paragraph</p>
<p>This is another paragraph</p>
 XHTML Elements Must Be In
Lower Case
This is wrong:
<BODY>
<P>Thisis a paragraph</P>
</BODY>
Thisis correct:
<body>
<p>This isa paragraph</p>
</body>
Empty ElementsMust AlsoBe Closed
Thisis wrong:
A break:<br>
A horizontal rule:<hr>
An image:<imgsrc="happy.gif"alt="Happyface">
Thisis correct:
A break:<br />
A horizontal rule:<hr/>
An image:<imgsrc="happy.gif"alt="Happyface"/>
What are the X HTML line breakelements?
Line breakand tab elementscanbe usedwhenyouneedalittle more control overhow the browser
rendersthe text.The <BR> elementisused toforce a line break.
• The <br /> tag definesaforcedline breakwithinanXHTML document.
What are the horizontal rule elements?
Can be usedto separate contentinan HTML page.
<hr> If thistag was used,somethinglike this
will appearinyourHTML.
What are the X HTML headings& subheadings?
Tags that give yourpage structure and pull ittogether,givingitorder& meaning.
<h1>Heading...</h1> Heading
<h2>Sub-Heading...</h2>
<h3>Sub-Heading...</h3>
<h4>Sub-Heading...</h4> Sub-
<h5>Sub-Heading...</h5> Headings
<h6>Sub-Heading...</h6>
What isHTML comments?Give itssyntax.
Since HTML isofficiallyanSGML application,the commentsyntax usedinHTML documentsisactually
the SGML commentsyntax.Unfortunatelythissyntaxisabit unclearat first.
The definitionof anSGML commentisbasicallyasfollows:
A commentdeclaration startswith<!, followedbyzeroor more comments,followedby >.
A commentstartsand endswith"--",anddoesnot containanyoccurrence of "--".
This meansthatthe followingare all legal SGMLcomments:
<!-- Hello-->
<!-- Hello-- -- Hello-->
<!---->
<!------ Hello-->
<!>
Summary of XHTML Basics:
DOCTYPE must be specified first.
All elements must be in lowercase.
Each element must have a beginning and an end.
Elements must be properly nested.
White space doesn’t matter.

More Related Content

What's hot (20)

HTML Basic, CSS Basic, JavaScript basic.
HTML Basic, CSS Basic, JavaScript basic.HTML Basic, CSS Basic, JavaScript basic.
HTML Basic, CSS Basic, JavaScript basic.
 
Html xhtml tag-sheet
Html xhtml tag-sheetHtml xhtml tag-sheet
Html xhtml tag-sheet
 
Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
 
Artistic Web Applications - Week3 - Part 2
Artistic Web Applications - Week3 - Part 2Artistic Web Applications - Week3 - Part 2
Artistic Web Applications - Week3 - Part 2
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Let me design
Let me designLet me design
Let me design
 
Basic HTML Tutorial For Beginners
Basic HTML Tutorial For BeginnersBasic HTML Tutorial For Beginners
Basic HTML Tutorial For Beginners
 
Learning html. (Part- 1)
Learning html. (Part- 1)Learning html. (Part- 1)
Learning html. (Part- 1)
 
Week 5 Lecture
Week 5 LectureWeek 5 Lecture
Week 5 Lecture
 
Notes4
Notes4Notes4
Notes4
 
HTML Basics 1 workshop
HTML Basics 1 workshopHTML Basics 1 workshop
HTML Basics 1 workshop
 
Html basics
Html basicsHtml basics
Html basics
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Session4
Session4Session4
Session4
 
Xhtml
XhtmlXhtml
Xhtml
 
Basic html
Basic htmlBasic html
Basic html
 
Html
HtmlHtml
Html
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
 
Html notes with Examples
Html notes with ExamplesHtml notes with Examples
Html notes with Examples
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 

Viewers also liked

3rd grading-reviewer-pc-assembly-and-networking
3rd grading-reviewer-pc-assembly-and-networking3rd grading-reviewer-pc-assembly-and-networking
3rd grading-reviewer-pc-assembly-and-networkingstarlanter
 
Otonomi Daerah di Indonesia
Otonomi Daerah di IndonesiaOtonomi Daerah di Indonesia
Otonomi Daerah di IndonesiaHIA Class.
 
Equilibrium constant-presentation
Equilibrium constant-presentationEquilibrium constant-presentation
Equilibrium constant-presentationstarlanter
 
発明の神に好かれるには
発明の神に好かれるには発明の神に好かれるには
発明の神に好かれるにはShu Yamada
 
事業継続のためのIt運用
事業継続のためのIt運用事業継続のためのIt運用
事業継続のためのIt運用Shu Yamada
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せるShu Yamada
 
クラウド時代のItインフラ見直しlt版
クラウド時代のItインフラ見直しlt版クラウド時代のItインフラ見直しlt版
クラウド時代のItインフラ見直しlt版Shu Yamada
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せるShu Yamada
 
Spontaneity entropy___free_energy
Spontaneity  entropy___free_energySpontaneity  entropy___free_energy
Spontaneity entropy___free_energystarlanter
 
SWAT Analyse of Apple inc
SWAT Analyse of Apple inc SWAT Analyse of Apple inc
SWAT Analyse of Apple inc Arzath Areeff
 
Mahayana reporting
Mahayana reportingMahayana reporting
Mahayana reportingstarlanter
 
Office365導入時のDNS設定の注意点
Office365導入時のDNS設定の注意点Office365導入時のDNS設定の注意点
Office365導入時のDNS設定の注意点Shu Yamada
 
Exchange Onlineの階層型アドレス帳の設定事例
Exchange Onlineの階層型アドレス帳の設定事例Exchange Onlineの階層型アドレス帳の設定事例
Exchange Onlineの階層型アドレス帳の設定事例Shu Yamada
 
Booting of Computer System
Booting of Computer SystemBooting of Computer System
Booting of Computer SystemArzath Areeff
 
Basic concepts in computer security
Basic concepts in computer securityBasic concepts in computer security
Basic concepts in computer securityArzath Areeff
 

Viewers also liked (17)

3rd grading-reviewer-pc-assembly-and-networking
3rd grading-reviewer-pc-assembly-and-networking3rd grading-reviewer-pc-assembly-and-networking
3rd grading-reviewer-pc-assembly-and-networking
 
Thermochem
ThermochemThermochem
Thermochem
 
Otonomi Daerah di Indonesia
Otonomi Daerah di IndonesiaOtonomi Daerah di Indonesia
Otonomi Daerah di Indonesia
 
Equilibrium constant-presentation
Equilibrium constant-presentationEquilibrium constant-presentation
Equilibrium constant-presentation
 
発明の神に好かれるには
発明の神に好かれるには発明の神に好かれるには
発明の神に好かれるには
 
事業継続のためのIt運用
事業継続のためのIt運用事業継続のためのIt運用
事業継続のためのIt運用
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せる
 
クラウド時代のItインフラ見直しlt版
クラウド時代のItインフラ見直しlt版クラウド時代のItインフラ見直しlt版
クラウド時代のItインフラ見直しlt版
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せる
 
Spontaneity entropy___free_energy
Spontaneity  entropy___free_energySpontaneity  entropy___free_energy
Spontaneity entropy___free_energy
 
SWAT Analyse of Apple inc
SWAT Analyse of Apple inc SWAT Analyse of Apple inc
SWAT Analyse of Apple inc
 
Mahayana reporting
Mahayana reportingMahayana reporting
Mahayana reporting
 
Office365導入時のDNS設定の注意点
Office365導入時のDNS設定の注意点Office365導入時のDNS設定の注意点
Office365導入時のDNS設定の注意点
 
Exchange Onlineの階層型アドレス帳の設定事例
Exchange Onlineの階層型アドレス帳の設定事例Exchange Onlineの階層型アドレス帳の設定事例
Exchange Onlineの階層型アドレス帳の設定事例
 
Arrays in java
Arrays in javaArrays in java
Arrays in java
 
Booting of Computer System
Booting of Computer SystemBooting of Computer System
Booting of Computer System
 
Basic concepts in computer security
Basic concepts in computer securityBasic concepts in computer security
Basic concepts in computer security
 

Similar to Summary of-xhtml-basics

Similar to Summary of-xhtml-basics (20)

Html beginner
Html beginnerHtml beginner
Html beginner
 
Html basics
Html basicsHtml basics
Html basics
 
Html notes
Html notesHtml notes
Html notes
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
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
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)
 
Html example
Html exampleHtml example
Html example
 
HTML Notes And Some Attributes
HTML Notes And Some AttributesHTML Notes And Some Attributes
HTML Notes And Some Attributes
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Learn html from www
Learn html from wwwLearn html from www
Learn html from www
 
Html basics NOTE
Html basics NOTEHtml basics NOTE
Html basics NOTE
 
Html full
Html fullHtml full
Html full
 
html complete notes
html complete noteshtml complete notes
html complete notes
 
html compete notes basic to advanced
html compete notes basic to advancedhtml compete notes basic to advanced
html compete notes basic to advanced
 

Recently uploaded

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Summary of-xhtml-basics

  • 1. What arethe X HTML Elements? • XHTML elements are HTML elements written as XML XHTML Elements - Syntax Rules • XHTML elements must be properly nested • XHTML elements must always be closed • XHTML elements must be in lowercase • XHTML documents must have one root element • XHTML Elements Must Always Be Closed This is wrong: <p>This is a paragraph <p>This is another paragraph  This is correct: <p>This is a paragraph</p> <p>This is another paragraph</p>  XHTML Elements Must Be In Lower Case This is wrong: <BODY> <P>This is a paragraph</P> </BODY> This is correct: <body> <p>This is a paragraph</p> </body>  Empty Elements Must Also Be Closed  This is wrong: A break: <br> A horizontal rule:<hr> An image: <img src="happy.gif"alt="Happy face">  This is correct: A break: <br /> A horizontal rule:<hr /> An image: <img src="happy.gif"alt="Happy face" /> What arethe X HTML linebreak elements?  Line break and tab elements can be used when you need a littlemore control over how the browser renders the text. The <BR> element is used to force a linebreak.
  • 2. • The <br /> tag defines a forced linebreak within an XHTML document. What arethe horizontal ruleelements? • Can be used to separatecontent in an HTML page. • <hr> If this tag was used, something likethis will appear in your HTML. What arethe X HTML headings & subheadings? • Tags that give your page structure and pull ittogether, givingit order & meaning. <h1>Heading...</h1> Heading <h2>Sub-Heading...</h2> <h3>Sub-Heading...</h3> <h4>Sub-Heading...</h4> Sub- <h5>Sub-Heading...</h5> Headings <h6>Sub-Heading...</h6> What is HTML comments? Give its syntax. • SinceHTML is officially an SGML application,the comment syntax used in HTML documents is actually theSGML comment syntax.Unfortunately this syntax is a bit unclear atfirst. • The definition of an SGML comment is basically as follows: A comment declaration starts with <!, followed by zero or more comments, followed by >. A comment starts and ends with "--", and does not contain any occurrence of "--". This means that the followingareall legal SGML comments:  <!-- Hello -->  <!-- Hello -- -- Hello-->  <!---->  <!------ Hello -->  <!> Summary of XHTML Basics:  DOCTYPE must be specified first.  All elements must be in lowercase.  Each element must have a beginning and an end.  Elements must be properly nested.  White space doesn’t matter.
  • 3. Description of the Basic Elements DOCTYPE: This tells the browser what version of HTML or XHTML the document is using. This should be before any tags in the web page. The most commonly used DOCTYPEs are "strict" and "transitional". <html> and </html>: These are the first and last html tags in your web page. They tell the browser you are writing an HTML document. <head> and </head>: The head tags surround all the special elements, such as CSS styling, that do notget displayed directly in your web page. The head elements are always above the body tags, just like a person’s head is on top of their body. <body> and </body>: The body tags surround all of the content (text, images, links, tables, etc.) that will be displayed in your web page. Each of these elements can be used only once per web page. What is a Web Page? A web page is a file on a computer written in HTML format. HTML stands for Hyper Text Markup Language. This computer file contains both web-specific code and also "content," which is what actually gets displayed in the web page. Content includes text, pictures, tables, links, lists, embedded video, embedded audio, etc. The code will always include HTML elements, which define and organize the page. Most modern web pages will also include formatting code known as CSS (Cascading Style Shee What is the difference between my notepad file and my web page file? None, actually. They are the exact same file. HTML files (that end in .html or .htm) can be displayed two different ways. If an html file is opened in a text editor, such as Notepad, the html code displays. If an html file is opened in a browser (such as Internet Explorer or Firefox), the code is interpreted by the browser and the content is displayed in the browser window as a web page. What is an HTML element? An HTML element is a component of an HTML document. It is typically comprised of a start tag, an end tag, and some web content in between the start and end tag. For example, the <a> element places a link into a web page. What is a tag? A tag is an html "command" that tells the browser to perform some action. The start tag is surrounded by brackets, such as <a> and the end tag looks the same but with an additional forward slash, such as </a>. Most HTML elements have a start tag and a separate end tag. What is an attribute? Most tags can include attributes and attribute values, which further define what the browser should display. For example, in the start tag <a href="page2.html">, the "href" is the attribute being defined and the "page2.html" is the attribute value.
  • 4. What is content? Content is everything that is actually visible when a visitor views our web page. To our visitor, none of the HTML or CSS code matters; they are interested only in the content. It is our job as web designers to present that content to our visitors in the best way possible. Summary of XHTML Basics: DOCTYPE must be specified first. All elements must be in lowercase. Each element must have a beginning and an end. Elements must be properly nested. White space doesn’t matter. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit of using XHTML is that it helps make web pages look identical in different browsers, such as Internet Explorer, Firefox, Safari, etc. XHTML is used to define and organize the page content but not to format or style it. Elements and Attributesand XHTML Elements <head> </head> The <head> element contains special information that does not Necessarily show up on the web page. <title> </title> The <title> element determines what text will display in the title bar of the web browser. <body> </body> The <body> element is where all the "content" of your web page goesibutes Elements What are the X HTML Elements? XHTML elementsare HTML elementswrittenasXML XHTML Elements- Syntax Rules XHTML elementsmustbe properlynested XHTML elementsmustalwaysbe closed XHTML elementsmustbe in lowercase XHTML documentsmusthave one root element XHTML ElementsMust AlwaysBe Closed Thisis wrong: <p>This is a paragraph <p>This is another paragraph  This is correct: <p>This is a paragraph</p> <p>This is another paragraph</p>  XHTML Elements Must Be In Lower Case This is wrong:
  • 5. <BODY> <P>Thisis a paragraph</P> </BODY> Thisis correct: <body> <p>This isa paragraph</p> </body> Empty ElementsMust AlsoBe Closed Thisis wrong: A break:<br> A horizontal rule:<hr> An image:<imgsrc="happy.gif"alt="Happyface"> Thisis correct: A break:<br /> A horizontal rule:<hr/> An image:<imgsrc="happy.gif"alt="Happyface"/> What are the X HTML line breakelements? Line breakand tab elementscanbe usedwhenyouneedalittle more control overhow the browser rendersthe text.The <BR> elementisused toforce a line break. • The <br /> tag definesaforcedline breakwithinanXHTML document. What are the horizontal rule elements? Can be usedto separate contentinan HTML page. <hr> If thistag was used,somethinglike this will appearinyourHTML. What are the X HTML headings& subheadings? Tags that give yourpage structure and pull ittogether,givingitorder& meaning. <h1>Heading...</h1> Heading <h2>Sub-Heading...</h2> <h3>Sub-Heading...</h3> <h4>Sub-Heading...</h4> Sub- <h5>Sub-Heading...</h5> Headings <h6>Sub-Heading...</h6> What isHTML comments?Give itssyntax. Since HTML isofficiallyanSGML application,the commentsyntax usedinHTML documentsisactually the SGML commentsyntax.Unfortunatelythissyntaxisabit unclearat first. The definitionof anSGML commentisbasicallyasfollows: A commentdeclaration startswith<!, followedbyzeroor more comments,followedby >. A commentstartsand endswith"--",anddoesnot containanyoccurrence of "--". This meansthatthe followingare all legal SGMLcomments: <!-- Hello--> <!-- Hello-- -- Hello--> <!----> <!------ Hello--> <!> Summary of XHTML Basics: DOCTYPE must be specified first. All elements must be in lowercase. Each element must have a beginning and an end. Elements must be properly nested. White space doesn’t matter.