SlideShare a Scribd company logo
Web publishing and xhtml
This lecture Goal Introduce XML based markup languages, using xhtml as example Understand "well formed" and "valid" Understand difference between structure and presentation Differences between the ”old” html and the ”new” xhtml
Web - basic principles Two main components. http - Hypertext Transfer Protocol A computer protocol for transferring small files over the internet. html - Hypertext Markup Language A markup language used to describe hypertext documents, that is documents with links to other documents. Also the main topic of this lecture
Markup languages A family of computer languages for encoding information using elements/tags <title>A Midsummer Night's Dream</title> Many different markup languages for different purposes html for web pages Wml for (old) wap pages (mobile phones) SVG for vector graphics SMIL for multimedia JDF for ”job tickets” (printing industry)
Why use markup for content? Structure adds flexibility. Compare A scanned text. No possibilities to change the text, change pictures, fonts, colours… A word document where only different fonts and font sizes have been used to indicate headings: changes in heading fonts/sizes must be done for each heading individually, no possibilities for creating indexes. A word document where headings are coded as actual headings (heading1, heading2…). Changes can easilly be done in the templates which affect the entire document instantly, indexes can be created…
Example of markup language:xhtml Elements start with <element_name> and are finished with </element_name> Different markup languages have different elements The elements to the right are from the xhtml vocabulary, but does not exist in, for example, SVG. <html> <head> <title> A Title </title> </head> <body> <h1>Hello World</h1> </body> </html>
Hierarchical strukture <html> <head> <title> A Title </title> </head> <body> <h1>Hello World</h1> </body> </html> html head body title h1 A Title Hello World Element nodes Text nodes
Example - XHTML <?xml version=&quot;1.0&quot;> <?xml-stylesheet type=&quot;text/css&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /> <!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> <head> <title>Personal web page </title> </head> <body> <p align=&quot;center&quot;> <img src=&quot;/kth/bilder/nada.gif&quot; alt=&quot;Nada&quot; width=&quot;468&quot; height=&quot;68&quot;/> </p> </body> </html>
Exemple - SMIL <?xml version=&quot;1.0&quot;?> <smil> <head> <layout>  <root-layout height=&quot;350&quot; width=&quot;600&quot;  title=&quot;Universal SMIL Document&quot;/> <region id=&quot;w&quot; left=&quot;174&quot; top=&quot;100&quot; height=&quot;47&quot; width=&quot;63&quot;  z-index=&quot;3&quot; /> </layout> </head> <body> <video src=&quot;Help.mov&quot;  begin=&quot;0.00s&quot; end=&quot;11.00s&quot; /> </body> </smil>
Example - Data format <?xml version=&quot;1.0&quot;?> <imf> <head> <version>3.0</version> <source supplier=&quot;PrintingCompany-1&quot; application=&quot;Application-1&quot;/> <time>1997-10-06T00:11:00.00+2</time> </head> <body> <object action=&quot;modify&quot;> <PrintingJob/> <object_uid> <source supplier=&quot;PrintingCompany-1&quot; application=&quot;Application-1&quot;/> <local_id>17</local_id> </object_uid> <attributes> <ActualCopies>14322</ActualCopies> </attributes> </object> </body> </imf>
Element contents Most elements have content, either text content or other elements Some elements does not have content, the presence of the element is all information that is required Element content <head> <title>Hello</title> </head> Text content <title>Hello</title> Empty content <br></br>, <hr></hr> Or the short form <br/>, <hr/>
Attributes Additional aspects of an element can be encoded as ”attributes” of the element <img src=”monkey.gif&quot; alt=”Picture of a monkey&quot;/> An empty element with two attributes; src and alt General syntax:  attribute_name   = ” attribute_value &quot; Single quotes ok:  attribute_name   = ' attribute_value ' Note!  It must be regular quotes (&quot;), not typographical quotes (”).
Images Images are inserted using the element <img> with the attribute src with a reference to an image file Starting with xhtml all image elements must also contain the attribute ”alt” with a text-based description of the image <img src=&quot;http://www.kth.se/logos/kth.gif&quot; alt=”Image of KTH&quot; />
html and xhtml Xhtml is based on XML, when html was based on SGML. More on XML in a later lecture. Being based on XML makes it possible to use a number of tools and sofware. Important differences between html and xhtml All tags must be closed:. <br></br> (or the short form <br/> for line breaks instead of just <br> which was used in html All tag names and element names must be in ”small” letters.
Well-formed An XML document is &quot;well formed&quot; if it fulfills a number of criteria. All XML documents (including xhtml)  must  be well-formed. Example All start-tags must have a corresponding end-tag (<html></html>) The elements must form a tree structure <i><p></p></i> but  NOT  <i><p></i></p>) Attribute values must be enclosed by quotes.
Logical vs physical tags XHTML separates content and the presentation of content Tags like <font> and attributes like bgcolor are no longer allowed, all layout should be done using style sheets, CSS. This makes it easier to interpret content for other devices than web browsers (like voice synthesizes, search engines, mobile web browsers…) .
Validation To check if xhtml code is correct, you can use a process called validation This process checks that only xhtml elements and attributes are used, and are used correctly Web based validation service at http://validator.w3.org/ To be able to validate a web page, it is important to denote exactly which xhtml version the web page conforms to. In an xhmlt document, lines like this are added in the beginning of the document. <!DOCTYPE html  PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>

More Related Content

What's hot (20)

PDF
[Basic HTML/CSS] 1. html - basic tags
Hyejin Oh
 
PPT
Design Tools Html Xhtml
Ahsan Uddin Shan
 
PPT
Web Development using HTML & CSS
Shashank Skills Academy
 
PPT
Introduction to HTML
MayaLisa
 
PPT
Intro to html
anshuman rahi
 
PPTX
HTML Introduction
Hameda Hurmat
 
PDF
Michael(tm) Smith ED09 presentation
Michael(tm) Smith
 
PPTX
Basic Html Knowledge for students
vethics
 
PDF
Html - Tutorial
adelaticleanu
 
PPT
Html For Beginners 2
Sriram Raj
 
PPT
Basic html
Drew Eric Noftle
 
PPTX
Html
Sadeek Mohammed
 
PPTX
HTML Basic Tags
Nisa Soomro
 
PDF
Intro to HTML (Kid's Class at TIY)
Marjorie Sample
 
PPT
HTML
Gouthaman V
 
PPT
Html
mussawir20
 
PPTX
Ict html
Thando Mdluli
 
PPTX
Html 5
Arashdeepkaur16
 
PPT
Html
Bhumika Ratan
 
PPT
Xhtml
Manav Prasad
 
[Basic HTML/CSS] 1. html - basic tags
Hyejin Oh
 
Design Tools Html Xhtml
Ahsan Uddin Shan
 
Web Development using HTML & CSS
Shashank Skills Academy
 
Introduction to HTML
MayaLisa
 
Intro to html
anshuman rahi
 
HTML Introduction
Hameda Hurmat
 
Michael(tm) Smith ED09 presentation
Michael(tm) Smith
 
Basic Html Knowledge for students
vethics
 
Html - Tutorial
adelaticleanu
 
Html For Beginners 2
Sriram Raj
 
Basic html
Drew Eric Noftle
 
HTML Basic Tags
Nisa Soomro
 
Intro to HTML (Kid's Class at TIY)
Marjorie Sample
 
Ict html
Thando Mdluli
 

Viewers also liked (18)

PPTX
Web publishing
Kanav Sood
 
PPTX
Xhtml
CLI-IE
 
PPT
Dreamweaver & Me PPT
electricgeisha
 
PDF
Introduction to Dreamweaver
Sarah Bombich
 
PDF
A Multiformat Document Workflow With Docutils
Matthew Leingang
 
PPTX
How to - analysis and design of web publishing solutions with SharePoint
Knowledge Cue
 
PDF
Digital Publishing
Magazine Training International
 
PPT
Web browsers and website publishing
Gurleen Kaur
 
PPTX
Electronic publishing
Shafiq-ur-rehman Ansari
 
PPTX
Content Management System
OmnePresent
 
PPT
Content Management System
Deepak Devadasan
 
PPT
What is a Content Management System or CMS
Steve Williams
 
PPT
models of e publishing
Essam Obaid
 
PPT
introduction to electronic publishing
Essam Obaid
 
PPT
Content Management Systems
sahig123
 
PPT
CMS (CONTENT MANAGEMENT SYSTEM)
Aaina Katyal
 
PPT
Content Management Systems
Kowshar Ahmed
 
Web publishing
Kanav Sood
 
Xhtml
CLI-IE
 
Dreamweaver & Me PPT
electricgeisha
 
Introduction to Dreamweaver
Sarah Bombich
 
A Multiformat Document Workflow With Docutils
Matthew Leingang
 
How to - analysis and design of web publishing solutions with SharePoint
Knowledge Cue
 
Web browsers and website publishing
Gurleen Kaur
 
Electronic publishing
Shafiq-ur-rehman Ansari
 
Content Management System
OmnePresent
 
Content Management System
Deepak Devadasan
 
What is a Content Management System or CMS
Steve Williams
 
models of e publishing
Essam Obaid
 
introduction to electronic publishing
Essam Obaid
 
Content Management Systems
sahig123
 
CMS (CONTENT MANAGEMENT SYSTEM)
Aaina Katyal
 
Content Management Systems
Kowshar Ahmed
 
Ad

Similar to Web publishing and XHTML (20)

PPTX
Markup Documents
Steven Cahill
 
PPT
Xhtml 2010
guest0f1e7f
 
PPT
Xhtml 2010
Cathie101
 
PPT
XHTML and CSS
peak3
 
PPT
1.1 xhtml basics
Bulldogs83
 
PDF
Rc064 010d Core Html 1
troopergreen
 
PPT
Html xhtml css
L15338
 
PPT
Semantically Correct And Standards Compliance Html
sanjay2211
 
PPTX
Class2
Jiyeon Lee
 
PPT
Xhtml Part1
nleesite
 
PPT
HTML Fundamentals
Doncho Minkov
 
PPT
xhtml_css.ppt
fakeaccount225095
 
PPTX
Xhtml and html5 basics
messinam
 
PPTX
IPW HTML course
Vlad Posea
 
PPS
Xhtml
Samir Sabry
 
PPTX
Mdst 3559-02-01-html
Rafael Alvarado
 
PPTX
1-02: HTML Markup Introduction
apnwebdev
 
PPT
Lecture07 ASDFASFA ASD ASD SDS XHTML.ppt
DrKBManwade
 
PPTX
HTML AND XML ppt.pptx
SRIRAM763018
 
PPTX
Web design - HTML (Hypertext Markup Language) introduction
Mustafa Kamel Mohammadi
 
Markup Documents
Steven Cahill
 
Xhtml 2010
guest0f1e7f
 
Xhtml 2010
Cathie101
 
XHTML and CSS
peak3
 
1.1 xhtml basics
Bulldogs83
 
Rc064 010d Core Html 1
troopergreen
 
Html xhtml css
L15338
 
Semantically Correct And Standards Compliance Html
sanjay2211
 
Class2
Jiyeon Lee
 
Xhtml Part1
nleesite
 
HTML Fundamentals
Doncho Minkov
 
xhtml_css.ppt
fakeaccount225095
 
Xhtml and html5 basics
messinam
 
IPW HTML course
Vlad Posea
 
Mdst 3559-02-01-html
Rafael Alvarado
 
1-02: HTML Markup Introduction
apnwebdev
 
Lecture07 ASDFASFA ASD ASD SDS XHTML.ppt
DrKBManwade
 
HTML AND XML ppt.pptx
SRIRAM763018
 
Web design - HTML (Hypertext Markup Language) introduction
Mustafa Kamel Mohammadi
 
Ad

More from bjornh (20)

PPT
Info kexjobb-2013-11-11
bjornh
 
PPT
Info om masterval och kexjobb, medieteknik KTH VT2013
bjornh
 
PPTX
Teaching procrastination - A way of helping students to improve their study h...
bjornh
 
PPT
Info masterval medieteknik på KTH 2012-05-03
bjornh
 
PPT
Info masterval och kexjobb i medieteknik KTH HT 2011
bjornh
 
PPT
LIKT seminar on mobile learning
bjornh
 
PPT
Location-based mLearning reminders
bjornh
 
PPT
K-Seminar on mobile learning
bjornh
 
PPT
Podcastseminarium
bjornh
 
PPT
Web 2.0
bjornh
 
PPT
XML Schemas
bjornh
 
PPT
XSL-FO
bjornh
 
PPT
RDF och RSS
bjornh
 
PPT
Namespaces
bjornh
 
PPT
Device Independence
bjornh
 
PPT
XSLT
bjornh
 
PPT
CSS
bjornh
 
PPT
PHP och MySQL
bjornh
 
PPT
Web 2.0
bjornh
 
PPT
XML och DTD
bjornh
 
Info kexjobb-2013-11-11
bjornh
 
Info om masterval och kexjobb, medieteknik KTH VT2013
bjornh
 
Teaching procrastination - A way of helping students to improve their study h...
bjornh
 
Info masterval medieteknik på KTH 2012-05-03
bjornh
 
Info masterval och kexjobb i medieteknik KTH HT 2011
bjornh
 
LIKT seminar on mobile learning
bjornh
 
Location-based mLearning reminders
bjornh
 
K-Seminar on mobile learning
bjornh
 
Podcastseminarium
bjornh
 
Web 2.0
bjornh
 
XML Schemas
bjornh
 
XSL-FO
bjornh
 
RDF och RSS
bjornh
 
Namespaces
bjornh
 
Device Independence
bjornh
 
XSLT
bjornh
 
CSS
bjornh
 
PHP och MySQL
bjornh
 
Web 2.0
bjornh
 
XML och DTD
bjornh
 

Recently uploaded (20)

PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
The Future of Artificial Intelligence (AI)
Mukul
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 

Web publishing and XHTML

  • 2. This lecture Goal Introduce XML based markup languages, using xhtml as example Understand &quot;well formed&quot; and &quot;valid&quot; Understand difference between structure and presentation Differences between the ”old” html and the ”new” xhtml
  • 3. Web - basic principles Two main components. http - Hypertext Transfer Protocol A computer protocol for transferring small files over the internet. html - Hypertext Markup Language A markup language used to describe hypertext documents, that is documents with links to other documents. Also the main topic of this lecture
  • 4. Markup languages A family of computer languages for encoding information using elements/tags <title>A Midsummer Night's Dream</title> Many different markup languages for different purposes html for web pages Wml for (old) wap pages (mobile phones) SVG for vector graphics SMIL for multimedia JDF for ”job tickets” (printing industry)
  • 5. Why use markup for content? Structure adds flexibility. Compare A scanned text. No possibilities to change the text, change pictures, fonts, colours… A word document where only different fonts and font sizes have been used to indicate headings: changes in heading fonts/sizes must be done for each heading individually, no possibilities for creating indexes. A word document where headings are coded as actual headings (heading1, heading2…). Changes can easilly be done in the templates which affect the entire document instantly, indexes can be created…
  • 6. Example of markup language:xhtml Elements start with <element_name> and are finished with </element_name> Different markup languages have different elements The elements to the right are from the xhtml vocabulary, but does not exist in, for example, SVG. <html> <head> <title> A Title </title> </head> <body> <h1>Hello World</h1> </body> </html>
  • 7. Hierarchical strukture <html> <head> <title> A Title </title> </head> <body> <h1>Hello World</h1> </body> </html> html head body title h1 A Title Hello World Element nodes Text nodes
  • 8. Example - XHTML <?xml version=&quot;1.0&quot;> <?xml-stylesheet type=&quot;text/css&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /> <!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> <head> <title>Personal web page </title> </head> <body> <p align=&quot;center&quot;> <img src=&quot;/kth/bilder/nada.gif&quot; alt=&quot;Nada&quot; width=&quot;468&quot; height=&quot;68&quot;/> </p> </body> </html>
  • 9. Exemple - SMIL <?xml version=&quot;1.0&quot;?> <smil> <head> <layout> <root-layout height=&quot;350&quot; width=&quot;600&quot; title=&quot;Universal SMIL Document&quot;/> <region id=&quot;w&quot; left=&quot;174&quot; top=&quot;100&quot; height=&quot;47&quot; width=&quot;63&quot; z-index=&quot;3&quot; /> </layout> </head> <body> <video src=&quot;Help.mov&quot; begin=&quot;0.00s&quot; end=&quot;11.00s&quot; /> </body> </smil>
  • 10. Example - Data format <?xml version=&quot;1.0&quot;?> <imf> <head> <version>3.0</version> <source supplier=&quot;PrintingCompany-1&quot; application=&quot;Application-1&quot;/> <time>1997-10-06T00:11:00.00+2</time> </head> <body> <object action=&quot;modify&quot;> <PrintingJob/> <object_uid> <source supplier=&quot;PrintingCompany-1&quot; application=&quot;Application-1&quot;/> <local_id>17</local_id> </object_uid> <attributes> <ActualCopies>14322</ActualCopies> </attributes> </object> </body> </imf>
  • 11. Element contents Most elements have content, either text content or other elements Some elements does not have content, the presence of the element is all information that is required Element content <head> <title>Hello</title> </head> Text content <title>Hello</title> Empty content <br></br>, <hr></hr> Or the short form <br/>, <hr/>
  • 12. Attributes Additional aspects of an element can be encoded as ”attributes” of the element <img src=”monkey.gif&quot; alt=”Picture of a monkey&quot;/> An empty element with two attributes; src and alt General syntax: attribute_name = ” attribute_value &quot; Single quotes ok: attribute_name = ' attribute_value ' Note! It must be regular quotes (&quot;), not typographical quotes (”).
  • 13. Images Images are inserted using the element <img> with the attribute src with a reference to an image file Starting with xhtml all image elements must also contain the attribute ”alt” with a text-based description of the image <img src=&quot;http://www.kth.se/logos/kth.gif&quot; alt=”Image of KTH&quot; />
  • 14. html and xhtml Xhtml is based on XML, when html was based on SGML. More on XML in a later lecture. Being based on XML makes it possible to use a number of tools and sofware. Important differences between html and xhtml All tags must be closed:. <br></br> (or the short form <br/> for line breaks instead of just <br> which was used in html All tag names and element names must be in ”small” letters.
  • 15. Well-formed An XML document is &quot;well formed&quot; if it fulfills a number of criteria. All XML documents (including xhtml) must be well-formed. Example All start-tags must have a corresponding end-tag (<html></html>) The elements must form a tree structure <i><p></p></i> but NOT <i><p></i></p>) Attribute values must be enclosed by quotes.
  • 16. Logical vs physical tags XHTML separates content and the presentation of content Tags like <font> and attributes like bgcolor are no longer allowed, all layout should be done using style sheets, CSS. This makes it easier to interpret content for other devices than web browsers (like voice synthesizes, search engines, mobile web browsers…) .
  • 17. Validation To check if xhtml code is correct, you can use a process called validation This process checks that only xhtml elements and attributes are used, and are used correctly Web based validation service at http://validator.w3.org/ To be able to validate a web page, it is important to denote exactly which xhtml version the web page conforms to. In an xhmlt document, lines like this are added in the beginning of the document. <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>