際際滷

際際滷Share a Scribd company logo
XHTML Review Part 1 Instructor: Nancy Lee
Course Objectives To understand important components of XHTML documents. To use XHTML to create Web pages. To be able to add images to Web pages To understand how to create and use hyperlinks to navigate Web pages To be able to mark up lists of information
Introduction Internet is 3 decades old The internet offers many opportunities You will develop your own web site in this class
Introduction You will add pages during the semester We will use XHTML for basic web pages Extensible Hypertext Markup Language
Introduction We will also use CSS to format pages Cascading Style Sheets XHTML unlike HTML Only content and structure Formatting using CSS
Editing XHTML Write XHTML in source-code form. Type into text editor Notepad Files are saved as  .html .htm
Editing XHTML XHTML documents are stored on a web server Test Page by opening in a browser Firefox IE6 Netscape
First XHTML Example main.html Required to conform to XHTML syntax <?xml version =1.0?> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot;  &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;>
First XHTML Example Comments <!-- Fig. : main.html --> <!-- Our first Web page  -->
First XHTML Example Element that defines the document <html xmlns =&quot; http://www.w3.org/1999/xhtml&quot;>  </html>
First XHTML Example Head element of document <html xmlns =&quot; http://www.w3.org/1999/xhtml&quot;>  <head>  </head>  </html>
First XHTML Example Head element of document Title Style information <html xmlns =&quot;  http://www.w3.org/1999/xhtml &quot;> <head>  <title>Internet and WWW How to Program - Welcome</title>  </head>  </html>
First XHTML Example Body element of document Content and structure <html xmlns =&quot;  http://www.w3.org/1999/xhtml &quot;> <head>  <title>Internet and WWW How to Program - Welcome</title>  </head>  <body>Key line in program: tells browser to display text   Tells browser to display text   <p>Welcome to XHTML!</p>  </body> </html>
First XHTML Example All XHTML documents delimit an element with   Start tag <html> End tag </html> All XHTML tags must have end tag
First XHTML Example All XHTML documents delimit an element with   Start tag <html  xmlns= http://www.w3.org/1999/xhtml> Start tags may have attributes Name Value Values must be enclosed in   Syntax error if not Upper case is a syntax error Separated by = sign
First XHTML Example Documents have two sections Head Body Nested elements should be indented for readability. Tags may not overlap
W3C XHTML Validation Service  W3C provides a validation service validator.w3.org Most browsers will attempt to render XHTML documents even if invalid
Headers header.html <body>  <h1>Level 1 Header</h1>  <h2>Level 2 header</h2>  <h3>Level 3 header</h3>  <h4>Level 4 header</h4>  <h5>Level 5 header</h5>  <h6>Level 6 header</h6>  </body> Size may vary by browser
Linking  Hyperlink Pages Images Sections link.html link2.html
Linking  Links are created with the anchor tag anchor element   <a> </a>
Linking  href attribute specifies link to URL <a href =&quot; http://www.yahoo.com&quot;>Yahoo!</a>   file  <a href =&quot; home.html&quot;>Home</a> e-mail address uses mailto: URL <a href = mailto:nancy_lee@ccsn.edu >email me</a>
Images picture.html Use img element to place pictures on your web page <img  /> Closing slash is required  />  or </img>
Images Attributes src <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg />  Height, Width <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg width=200 height=200 /> Image measured in pixels
Images Attributes alt (required in XHTML) <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg width=200 height=200 alt=This is a picture /> accessible pages Speech synthesizers use text
Images Nest img element inside of anchor element to create hyperlink using picture. Used to create buttons Pictorial links Thumbnails
Images Non spacing break element does not have ending tag, but is required for XHTML <br />
Images nav.html Discuss use of buttons for navigation links
Special Characters and More Line Breaks Some characters are not on keyboard or difficult to type Symbols may cause syntax error  <  > = Use &code; Example: <p> if  x < 10 then increment x by 1</p> Causes syntax error <p> if x &lt; 10 then increment x by 1</p> See Appendix A in text.
Unordered Lists Unordered list element  <ul> </ul> List <li> </li>
Nested and Ordered Lists Ordered and unordered lists may be nested Example program list.html

More Related Content

What's hot (20)

Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010
Matthew Mobbs
How To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My WebHow To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My Web
sritikumar
YL Intro html
YL Intro htmlYL Intro html
YL Intro html
dilom1986
Learning HTML
Learning HTMLLearning HTML
Learning HTML
Desarae Veit
Lesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and ParagraphsLesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and Paragraphs
Keith Borgonia Manatad
Meta tags1
Meta tags1Meta tags1
Meta tags1
hapy
How an html file is structured
How an html file is structuredHow an html file is structured
How an html file is structured
crmolloy
Links in Html
Links in HtmlLinks in Html
Links in Html
sadeenedian08
How to update HTML files
How to update HTML filesHow to update HTML files
How to update HTML files
JadeMagnet
Internet Tips
Internet TipsInternet Tips
Internet Tips
DigitalLifeAdvisor.com
Block2 Session2 Presentation
Block2 Session2 PresentationBlock2 Session2 Presentation
Block2 Session2 Presentation
Michael Gwyther
Basic HTML
Basic HTMLBasic HTML
Basic HTML
coachhahn
Lesson plan htmltextformattingtag
Lesson plan htmltextformattingtagLesson plan htmltextformattingtag
Lesson plan htmltextformattingtag
Keith Borgonia Manatad
J309-14 Week One
J309-14 Week OneJ309-14 Week One
J309-14 Week One
kimbui
Lesson plan 3
Lesson plan 3Lesson plan 3
Lesson plan 3
Keith Borgonia Manatad
Anchor tag HTML Presentation
Anchor tag HTML PresentationAnchor tag HTML Presentation
Anchor tag HTML Presentation
Nimish Gupta
HTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchorsHTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchors
Grayzon Gonzales, LPT
Hyper text markup Language
Hyper text markup LanguageHyper text markup Language
Hyper text markup Language
Naveeth Babu
Basic Html for beginners.
Basic Html for beginners.Basic Html for beginners.
Basic Html for beginners.
Muhammad Shafique
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niaz
ikram niaz
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010
Matthew Mobbs
How To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My WebHow To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My Web
sritikumar
YL Intro html
YL Intro htmlYL Intro html
YL Intro html
dilom1986
Lesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and ParagraphsLesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and Paragraphs
Keith Borgonia Manatad
Meta tags1
Meta tags1Meta tags1
Meta tags1
hapy
How an html file is structured
How an html file is structuredHow an html file is structured
How an html file is structured
crmolloy
How to update HTML files
How to update HTML filesHow to update HTML files
How to update HTML files
JadeMagnet
Block2 Session2 Presentation
Block2 Session2 PresentationBlock2 Session2 Presentation
Block2 Session2 Presentation
Michael Gwyther
Basic HTML
Basic HTMLBasic HTML
Basic HTML
coachhahn
J309-14 Week One
J309-14 Week OneJ309-14 Week One
J309-14 Week One
kimbui
Anchor tag HTML Presentation
Anchor tag HTML PresentationAnchor tag HTML Presentation
Anchor tag HTML Presentation
Nimish Gupta
HTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchorsHTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchors
Grayzon Gonzales, LPT
Hyper text markup Language
Hyper text markup LanguageHyper text markup Language
Hyper text markup Language
Naveeth Babu
Basic Html for beginners.
Basic Html for beginners.Basic Html for beginners.
Basic Html for beginners.
Muhammad Shafique
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niaz
ikram niaz

Similar to Xhtml Part1 (20)

Intr To Html & Xhtml
Intr To Html & XhtmlIntr To Html & Xhtml
Intr To Html & Xhtml
Digital Insights - Digital Marketing Agency
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
Doncho Minkov
Html
HtmlHtml
Html
Cerise Anderson
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technology
vikram singh
Creating a Webpage
Creating a WebpageCreating a Webpage
Creating a Webpage
Matthew Mobbs
Class2
Class2Class2
Class2
Jiyeon Lee
Diva
DivaDiva
Diva
diva23
Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecture
webhostingguy
Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
Iblesoft
1.1 xhtml basics
1.1 xhtml basics1.1 xhtml basics
1.1 xhtml basics
Bulldogs83
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
phuphax
HTML_際際滷show1
HTML_際際滷show1HTML_際際滷show1
HTML_際際滷show1
ldehn
Web Designing
Web DesigningWeb Designing
Web Designing
VNIT-ACM Student Chapter
Html
HtmlHtml
Html
Chidanand Byahatti
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
guest0f1e7f
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
Cathie101
HTML
HTMLHTML
HTML
Gouthaman V
APEX Themes and Templates
APEX Themes and TemplatesAPEX Themes and Templates
APEX Themes and Templates
InSync Conference
Webpages And Dynamic Content
Webpages And Dynamic ContentWebpages And Dynamic Content
Webpages And Dynamic Content
maycourse
IPW HTML course
IPW HTML courseIPW HTML course
IPW HTML course
Vlad Posea

Recently uploaded (20)

Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Jonathan Bowen
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarterQ4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
MariaBarbaraPaglinaw
Unlock AI Creativity: Image Generation with DALL揃E
Unlock AI Creativity: Image Generation with DALL揃EUnlock AI Creativity: Image Generation with DALL揃E
Unlock AI Creativity: Image Generation with DALL揃E
Expeed Software
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
Both Feet on the Ground - Generative Artificial Intelligence
Both Feet on the Ground - Generative Artificial IntelligenceBoth Feet on the Ground - Generative Artificial Intelligence
Both Feet on the Ground - Generative Artificial Intelligence
Pete Nieminen
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Formal Methods: Whence and Whither? [Martin Fr辰nzle Festkolloquium, 2025]
Jonathan Bowen
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarterQ4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
Q4_TLE-7-Lesson-6-Week-6.pptx 4th quarter
MariaBarbaraPaglinaw
Unlock AI Creativity: Image Generation with DALL揃E
Unlock AI Creativity: Image Generation with DALL揃EUnlock AI Creativity: Image Generation with DALL揃E
Unlock AI Creativity: Image Generation with DALL揃E
Expeed Software
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-StoryRevolutionizing-Government-Communication-The-OSWAN-Success-Story
Revolutionizing-Government-Communication-The-OSWAN-Success-Story
ssuser52ad5e
Both Feet on the Ground - Generative Artificial Intelligence
Both Feet on the Ground - Generative Artificial IntelligenceBoth Feet on the Ground - Generative Artificial Intelligence
Both Feet on the Ground - Generative Artificial Intelligence
Pete Nieminen

Xhtml Part1

  • 1. XHTML Review Part 1 Instructor: Nancy Lee
  • 2. Course Objectives To understand important components of XHTML documents. To use XHTML to create Web pages. To be able to add images to Web pages To understand how to create and use hyperlinks to navigate Web pages To be able to mark up lists of information
  • 3. Introduction Internet is 3 decades old The internet offers many opportunities You will develop your own web site in this class
  • 4. Introduction You will add pages during the semester We will use XHTML for basic web pages Extensible Hypertext Markup Language
  • 5. Introduction We will also use CSS to format pages Cascading Style Sheets XHTML unlike HTML Only content and structure Formatting using CSS
  • 6. Editing XHTML Write XHTML in source-code form. Type into text editor Notepad Files are saved as .html .htm
  • 7. Editing XHTML XHTML documents are stored on a web server Test Page by opening in a browser Firefox IE6 Netscape
  • 8. First XHTML Example main.html Required to conform to XHTML syntax <?xml version =1.0?> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;>
  • 9. First XHTML Example Comments <!-- Fig. : main.html --> <!-- Our first Web page -->
  • 10. First XHTML Example Element that defines the document <html xmlns =&quot; http://www.w3.org/1999/xhtml&quot;> </html>
  • 11. First XHTML Example Head element of document <html xmlns =&quot; http://www.w3.org/1999/xhtml&quot;> <head> </head> </html>
  • 12. First XHTML Example Head element of document Title Style information <html xmlns =&quot; http://www.w3.org/1999/xhtml &quot;> <head> <title>Internet and WWW How to Program - Welcome</title> </head> </html>
  • 13. First XHTML Example Body element of document Content and structure <html xmlns =&quot; http://www.w3.org/1999/xhtml &quot;> <head> <title>Internet and WWW How to Program - Welcome</title> </head> <body>Key line in program: tells browser to display text Tells browser to display text <p>Welcome to XHTML!</p> </body> </html>
  • 14. First XHTML Example All XHTML documents delimit an element with Start tag <html> End tag </html> All XHTML tags must have end tag
  • 15. First XHTML Example All XHTML documents delimit an element with Start tag <html xmlns= http://www.w3.org/1999/xhtml> Start tags may have attributes Name Value Values must be enclosed in Syntax error if not Upper case is a syntax error Separated by = sign
  • 16. First XHTML Example Documents have two sections Head Body Nested elements should be indented for readability. Tags may not overlap
  • 17. W3C XHTML Validation Service W3C provides a validation service validator.w3.org Most browsers will attempt to render XHTML documents even if invalid
  • 18. Headers header.html <body> <h1>Level 1 Header</h1> <h2>Level 2 header</h2> <h3>Level 3 header</h3> <h4>Level 4 header</h4> <h5>Level 5 header</h5> <h6>Level 6 header</h6> </body> Size may vary by browser
  • 19. Linking Hyperlink Pages Images Sections link.html link2.html
  • 20. Linking Links are created with the anchor tag anchor element <a> </a>
  • 21. Linking href attribute specifies link to URL <a href =&quot; http://www.yahoo.com&quot;>Yahoo!</a> file <a href =&quot; home.html&quot;>Home</a> e-mail address uses mailto: URL <a href = mailto:nancy_lee@ccsn.edu >email me</a>
  • 22. Images picture.html Use img element to place pictures on your web page <img /> Closing slash is required /> or </img>
  • 23. Images Attributes src <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg /> Height, Width <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg width=200 height=200 /> Image measured in pixels
  • 24. Images Attributes alt (required in XHTML) <img src=/slideshow/xhtml-part1-presentation/838591/picture.jpg width=200 height=200 alt=This is a picture /> accessible pages Speech synthesizers use text
  • 25. Images Nest img element inside of anchor element to create hyperlink using picture. Used to create buttons Pictorial links Thumbnails
  • 26. Images Non spacing break element does not have ending tag, but is required for XHTML <br />
  • 27. Images nav.html Discuss use of buttons for navigation links
  • 28. Special Characters and More Line Breaks Some characters are not on keyboard or difficult to type Symbols may cause syntax error < > = Use &code; Example: <p> if x < 10 then increment x by 1</p> Causes syntax error <p> if x &lt; 10 then increment x by 1</p> See Appendix A in text.
  • 29. Unordered Lists Unordered list element <ul> </ul> List <li> </li>
  • 30. Nested and Ordered Lists Ordered and unordered lists may be nested Example program list.html