XHTML Basics
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.
A basic XHTML document: <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
DOCTYPE must be specified on the first line: <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> The DOCTYPE tells the web browser which language is being used for the set of instructions that follow. In this class, we will be using XHTML Transitional, which allows us more flexibility than XHTML Strict.
In XHTML, all elements must be in lowercase (the DOCTYPE line is not an element.) <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
Each element must have a beginning and an end: <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
Elements must be properly nested: <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
What is wrong with this? <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul>
What is wrong with this? <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul> The tags are overlapped.
White space doesn’t matter. The browser will ignore blank lines and multiple spaces: <ul> <li>First Item</li><li>Second Item</li> </ul> <ul> <li>First Item</li> <li>Second Item</li> </ul> is the   same as: We can take advantage of this fact by putting blank lines and indents in our code to make it easier to organize and read.
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

PPTX
HTML to FTP
PPTX
Learning HTML
PPT
PPT
Hour 02
 
PPT
Transforming Xml Data Into Html
PPT
Html
PPT
XHTML basics
PPT
YL Intro html
HTML to FTP
Learning HTML
Hour 02
 
Transforming Xml Data Into Html
Html
XHTML basics
YL Intro html

What's hot (20)

PPT
Block2 Session2 Presentation
PPT
Understanding html
PPT
Working with External CSS
PPTX
How an html file is structured
PPT
5.2 nesting and floating elements
PPT
JWU Guest Talk: JavaScript and AJAX
PPTX
Basic HTML
PPT
Xhtml Part1
KEY
HTML presentation for beginners
PPTX
art2830 1st html tag presentation
PPT
Html tutorial
PPTX
Html tag html 10 x10 wen liu art 2830
PPTX
Introduction to html class-1
PPT
1.2 elements and attributes copy (3)
PPT
Html xhtml css
PPTX
Html
PPTX
HTML and CSS workshop
Block2 Session2 Presentation
Understanding html
Working with External CSS
How an html file is structured
5.2 nesting and floating elements
JWU Guest Talk: JavaScript and AJAX
Basic HTML
Xhtml Part1
HTML presentation for beginners
art2830 1st html tag presentation
Html tutorial
Html tag html 10 x10 wen liu art 2830
Introduction to html class-1
1.2 elements and attributes copy (3)
Html xhtml css
Html
HTML and CSS workshop

Viewers also liked (20)

PPT
Questionaire pancevo-teachers-2011
PPTX
TPA-AL Wiki Explained
PPT
Idiom 1
PDF
Industrial employment standing_orders_act_1946
PPTX
Energy questionnaire
PPTX
Recycling
PPTX
Eco world- Snežana
PPTX
Kade karu ott 2
PPTX
STUDENTS' FEEDBACKS
PPSX
Power a
KEY
You can build anything (Anita Borg 2011)
PPTX
Fashion than and_now
PPT
1.4 adding comments copy (2)
PPS
Power i
PPS
Power e
PPTX
Presentation 10
PPTX
Practical applications of theory for strategic planning
PDF
Beskonacnost
PPS
Power o
PPTX
Mūžizglītības programmas comenius apkašprogrammas
Questionaire pancevo-teachers-2011
TPA-AL Wiki Explained
Idiom 1
Industrial employment standing_orders_act_1946
Energy questionnaire
Recycling
Eco world- Snežana
Kade karu ott 2
STUDENTS' FEEDBACKS
Power a
You can build anything (Anita Borg 2011)
Fashion than and_now
1.4 adding comments copy (2)
Power i
Power e
Presentation 10
Practical applications of theory for strategic planning
Beskonacnost
Power o
Mūžizglītības programmas comenius apkašprogrammas

Similar to 1.1 xhtml basics (20)

PPT
HTML Fundamentals
PPSX
PPT
KMUTNB - Internet Programming 3/7
PPT
PPT
Learning HTML
PPT
PPT
Xhtml 2010
PPT
Xhtml 2010
KEY
HTML5 - techMaine Presentation 5/18/09
PPT
Introduction to XML
PPTX
Randy Witt Audio Assignment
PPT
PPT
Html For Beginners 2
PPT
Diva
PPT
ARTDM 171 Week 4: Tags
PPTX
Class2
PPT
Introduction To Xml
PPT
Design Tools Html Xhtml
ODP
HTML5: 5 Quick Wins
HTML Fundamentals
KMUTNB - Internet Programming 3/7
Learning HTML
Xhtml 2010
Xhtml 2010
HTML5 - techMaine Presentation 5/18/09
Introduction to XML
Randy Witt Audio Assignment
Html For Beginners 2
Diva
ARTDM 171 Week 4: Tags
Class2
Introduction To Xml
Design Tools Html Xhtml
HTML5: 5 Quick Wins

More from Bulldogs83 (16)

PPT
7.2 external style sheets
PPT
7.1 xhtml validation
PPT
6.2 css link styling
PPT
6.1 special characters
PPT
5.1 css box model
PPT
4.3 table styling
PPT
4.2 css classes
PPT
4.1 advanced tables
PPT
3.2 introduction to css
PPT
3.1 xhtml tables
PPT
3.2 introduction to css
PPT
2.1 adding images
PPT
1.4 adding comments copy (2)
PPT
1.3 creating links
PPT
1.3 creating links
PPT
1.2 elements and attributes copy (3)
7.2 external style sheets
7.1 xhtml validation
6.2 css link styling
6.1 special characters
5.1 css box model
4.3 table styling
4.2 css classes
4.1 advanced tables
3.2 introduction to css
3.1 xhtml tables
3.2 introduction to css
2.1 adding images
1.4 adding comments copy (2)
1.3 creating links
1.3 creating links
1.2 elements and attributes copy (3)

Recently uploaded (20)

PPTX
Math 2 Quarter 2 Week 1 Matatag Curriculum
PPTX
Power Point PR B.Inggris 12 Ed. 2019.pptx
PDF
FYJC - Chemistry textbook - standard 11.
PDF
FAMILY PLANNING (preventative and social medicine pdf)
PPTX
IT infrastructure and emerging technologies
PPTX
MMW-CHAPTER-1-final.pptx major Elementary Education
PPTX
Neurological complocations of systemic disease
PDF
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
PDF
Physical pharmaceutics two in b pharmacy
PDF
Unleashing the Potential of the Cultural and creative industries
PPTX
Copy of ARAL Program Primer_071725(1).pptx
PPTX
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
PPTX
UCSP Section A - Human Cultural Variations,Social Differences,social ChangeCo...
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
DOCX
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
PPTX
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
PPTX
operating_systems_presentations_delhi_nc
PDF
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
PDF
Diabetes Mellitus , types , clinical picture, investigation and managment
PDF
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
Math 2 Quarter 2 Week 1 Matatag Curriculum
Power Point PR B.Inggris 12 Ed. 2019.pptx
FYJC - Chemistry textbook - standard 11.
FAMILY PLANNING (preventative and social medicine pdf)
IT infrastructure and emerging technologies
MMW-CHAPTER-1-final.pptx major Elementary Education
Neurological complocations of systemic disease
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
Physical pharmaceutics two in b pharmacy
Unleashing the Potential of the Cultural and creative industries
Copy of ARAL Program Primer_071725(1).pptx
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
UCSP Section A - Human Cultural Variations,Social Differences,social ChangeCo...
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
operating_systems_presentations_delhi_nc
English 2nd semesteNotesh biology biopsy results from the other day and I jus...
Diabetes Mellitus , types , clinical picture, investigation and managment
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf

1.1 xhtml basics

  • 2. 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.
  • 3. A basic XHTML document: <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
  • 4. DOCTYPE must be specified on the first line: <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> The DOCTYPE tells the web browser which language is being used for the set of instructions that follow. In this class, we will be using XHTML Transitional, which allows us more flexibility than XHTML Strict.
  • 5. In XHTML, all elements must be in lowercase (the DOCTYPE line is not an element.) <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
  • 6. Each element must have a beginning and an end: <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
  • 7. Elements must be properly nested: <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>
  • 8. What is wrong with this? <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul>
  • 9. What is wrong with this? <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul> The tags are overlapped.
  • 10. White space doesn’t matter. The browser will ignore blank lines and multiple spaces: <ul> <li>First Item</li><li>Second Item</li> </ul> <ul> <li>First Item</li> <li>Second Item</li> </ul> is the same as: We can take advantage of this fact by putting blank lines and indents in our code to make it easier to organize and read.
  • 11. 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.