SlideShare a Scribd company logo
1 of 30
Download to read offline
Side Trip: XHTML




           Using XHTML
XHTML

●   Extensible Hypertext Markup Language
●   Supposedly the replacement for HTML.
●   Reformulation of HTML in XML.
    –   Still like HTML with the rules of XML (on
        wellformedness).
Required Elements in XHTML

●   <!DOCTYPE>
    –   One of three doctypes.
●   <html>
    –   Root element
●   <head>
●   <title>
●   <body>
Differences from HTML

●   Always well-formed.
●   Some elements are required elements.
●   Some elements in HTML that are formatting, e.g.
    <b>, <i>, etc. are avoided (Even absent) in
    XHTML.
    –   Presentation rules should be defined in CSS.
●   All tags, attributes and even attribute values are in
    lowercase characters.
●   Some attributes of some elements are required
    –   OTHERWISE your XHTML document is NOT valid
The DOCTYPES

●   XHTML Transitional
    –   Compatibility with old browsers that does not support
         CSS.
●   XHTML Strict
        –   Free from presentational elements.
●   XHTML Frameset
        –   When using <frameset> & <frame>
XHTML Template

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
  transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title goes here</title>
</head>

<body>
</body>

</html>
Where It's Going

●   XHTML 1.1 : Modularized XHTML
●   XHTML 2.0 : Still In Development
    –   HTML Forms to be replaced by XForms
    –   HTML frames to be replaced by XFrames
    –   Any element can become a hyperlink
    –   Etc..
Validating XHTML Documents
Presentation of (XML) Data for the
Web
XML: Separation of Data From
Presentation
●   XML Documents are data-centric.
    –   Markup of data only.
●   XML Documents should be free from
    presentation/styling/display/formatting elements.
    –   No elements included as to how other elements should
        be formatted
    –   This would keep any XML portable and
        display-“platform” independent.
Presentation of XML Data using
Stylesheet
●   A Stylesheet
    –   A specification on how to display the data.
●   Cascading Stylesheets (CSS)
    –   Added to HTML to solve rendering consistency
        problems
    –   With CSS We can specify how to exactly display
        HTML elements.
    –   CSS can be applied to XML documents as well.
CSS: Attaching to HTML

●   External Stylesheets
    –   CSS rules written in separate file
    –   Linked via

    <link rel=”stylesheet”
          href=”styles.css”
          type=”text/css” />

    <!-- styles.css is the URL of the
         CSS file -->
CSS: Attaching to HTML

●   Internal Stylesheets
    –   Style rules written inside <style> inside <head>


    <html>
         <head>
            <style>

            //style rules here
            </style>
         </head>
    . . .
CSS: Attaching to HTML

●   Inline Style
    –   Style rules written inside in style attribute in
        presentable elements



    <p style=”font:Arial”> ... </p>
    . . .
CSS Syntax

   selector { property : value;
              property2 : value2
                 }

               Example:
    p { font-family : “sans serif” }

       p { text-align: centery;
            color : red }
Specifying Selectors

●   Element name (e.g. <p>, <a> etc... }
    a { text-decoration: none }
    //represents the <a> elements

●   Element Class (specified by class attribute)

    .reddish { color:red }
    div.reddish { background-color : red }

    Corresponds to the ff:
    <a class=”reddish”>
    <div class=”reddish”>
Specifying Selectors

●   Element ID (specified by id attribute
    #unique { border : 1px solid black }
    a#unico { display: block }

    Corresponds to
    <p id=”unique”>
    <a id=”unico”>
Specifying Selectors

●   Grouped Selector
    h1,h2,h3,h4,h5,h6,h7 {
        color: blue
    }
●   Heirarchial Selector
    p a {
        text-decoration: none;
        color red;
    }
    // applies to: <a> elems inside <p>
Specifying Selectors

●   Element with Specific Attribute


input[type=”text”] {
     border: 1px solid red
}
/* applies to <input type=”text”>
elems, IE sucks on this
dunno about IE 7 though */
Specifying Selectors

●   Pseudo-classes


a:link { color: #FFFF00 }
a:hover { color: rgb(123,234,54) }
a:visited { color: salmon }
CSS Properties and Their Values

●   Background Properties   ●   Dimension
●   Text                    ●   Classification
●   Font                    ●   Positioning
●   Border                  ●   Print (CSS2 Media)
●   Margin                  ●   Aural (CSS2 Media)
●   Padding
●   List
CSS Properties and Their Values

●   Consult a CSS Reference for the different property
    names and their possible values.
CSS Inheritance

●   Most CSS properties are inheritable from more
    general selectors to more specific selectors
●   When two properties conflict, the more specific
    rule is applied, otherwise the rules combine.
Observe:

/* CSS Rules */             <!-- HTML Markup-->

a{                          <a href=””>Link 1</a>
    font-family: “sans
      serif”;               <div>
    color:red               <a href=””>Link 2</a>
    }
                            </div>
div a {
    color:blue;
    text-decoration:none;
}
CSS Rule application:

●   Browser Default
●   External CSS
●   Internal CSS
●   Inline


In terms of selector, the rules of the most specific
  selector that applies to an element overwrites any
  less specific declarations.
XML + CSS = Web Page

●   With any XML document, we can apply CSS to
    display it as web page.
●   The selectors will be the elements of the XML
    documents.

More Related Content

What's hot

Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptMarc Huang
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSMario Hernandez
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksAmit Tyagi
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheetMichael Jhon
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1Toni Kolev
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLToni Kolev
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
FFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryFFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryToni Kolev
 

What's hot (20)

XML Technologies
XML TechnologiesXML Technologies
XML Technologies
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
Xml
Xml Xml
Xml
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Xsd tutorial
Xsd tutorialXsd tutorial
Xsd tutorial
 
CSS
CSSCSS
CSS
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Xml
Xml Xml
Xml
 
CSS
CSSCSS
CSS
 
Css Basics
Css BasicsCss Basics
Css Basics
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
FFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryFFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQuery
 

Viewers also liked (11)

Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter2c
Chapter2cChapter2c
Chapter2c
 
Cmsc 100 (web content)
Cmsc 100  (web content)Cmsc 100  (web content)
Cmsc 100 (web content)
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter2b
Chapter2bChapter2b
Chapter2b
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 
linked list (CMSC 123)
linked list (CMSC 123)linked list (CMSC 123)
linked list (CMSC 123)
 
Chapter1c
Chapter1cChapter1c
Chapter1c
 
Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)
 
Chapter2d
Chapter2dChapter2d
Chapter2d
 
Chapter1a
Chapter1aChapter1a
Chapter1a
 

Similar to Side Trip: Learn XHTML and CSS for Web Design

Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
css-presentation.ppt
css-presentation.pptcss-presentation.ppt
css-presentation.pptprathur68
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssTesfaye Yenealem
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...JebaRaj26
 
An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)Ardee Aram
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptkassahungebrie
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshMukesh Kumar
 
Web Programming-css.pptx
Web Programming-css.pptxWeb Programming-css.pptx
Web Programming-css.pptxMarwaAnany1
 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.pptGmachImen
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxkarthiksmart21
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Gheyath M. Othman
 
Cascading Style Sheets - CSS - Tutorial
Cascading Style Sheets - CSS  -  TutorialCascading Style Sheets - CSS  -  Tutorial
Cascading Style Sheets - CSS - TutorialMSA Technosoft
 

Similar to Side Trip: Learn XHTML and CSS for Web Design (20)

Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
css-presentation.ppt
css-presentation.pptcss-presentation.ppt
css-presentation.ppt
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
Web technology Unit-II Part-C
Web technology Unit-II Part-CWeb technology Unit-II Part-C
Web technology Unit-II Part-C
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...
 
An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Web Programming-css.pptx
Web Programming-css.pptxWeb Programming-css.pptx
Web Programming-css.pptx
 
Css
CssCss
Css
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.ppt
 
Css
CssCss
Css
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Cascading Style Sheets - CSS - Tutorial
Cascading Style Sheets - CSS  -  TutorialCascading Style Sheets - CSS  -  Tutorial
Cascading Style Sheets - CSS - Tutorial
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
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
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Side Trip: Learn XHTML and CSS for Web Design

  • 1. Side Trip: XHTML Using XHTML
  • 2. XHTML ● Extensible Hypertext Markup Language ● Supposedly the replacement for HTML. ● Reformulation of HTML in XML. – Still like HTML with the rules of XML (on wellformedness).
  • 3. Required Elements in XHTML ● <!DOCTYPE> – One of three doctypes. ● <html> – Root element ● <head> ● <title> ● <body>
  • 4. Differences from HTML ● Always well-formed. ● Some elements are required elements. ● Some elements in HTML that are formatting, e.g. <b>, <i>, etc. are avoided (Even absent) in XHTML. – Presentation rules should be defined in CSS. ● All tags, attributes and even attribute values are in lowercase characters. ● Some attributes of some elements are required – OTHERWISE your XHTML document is NOT valid
  • 5. The DOCTYPES ● XHTML Transitional – Compatibility with old browsers that does not support CSS. ● XHTML Strict – Free from presentational elements. ● XHTML Frameset – When using <frameset> & <frame>
  • 6. XHTML Template <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title goes here</title> </head> <body> </body> </html>
  • 7. Where It's Going ● XHTML 1.1 : Modularized XHTML ● XHTML 2.0 : Still In Development – HTML Forms to be replaced by XForms – HTML frames to be replaced by XFrames – Any element can become a hyperlink – Etc..
  • 9.
  • 10.
  • 11.
  • 12. Presentation of (XML) Data for the Web
  • 13. XML: Separation of Data From Presentation ● XML Documents are data-centric. – Markup of data only. ● XML Documents should be free from presentation/styling/display/formatting elements. – No elements included as to how other elements should be formatted – This would keep any XML portable and display-“platform” independent.
  • 14. Presentation of XML Data using Stylesheet ● A Stylesheet – A specification on how to display the data. ● Cascading Stylesheets (CSS) – Added to HTML to solve rendering consistency problems – With CSS We can specify how to exactly display HTML elements. – CSS can be applied to XML documents as well.
  • 15. CSS: Attaching to HTML ● External Stylesheets – CSS rules written in separate file – Linked via <link rel=”stylesheet” href=”styles.css” type=”text/css” /> <!-- styles.css is the URL of the CSS file -->
  • 16. CSS: Attaching to HTML ● Internal Stylesheets – Style rules written inside <style> inside <head> <html> <head> <style> //style rules here </style> </head> . . .
  • 17. CSS: Attaching to HTML ● Inline Style – Style rules written inside in style attribute in presentable elements <p style=”font:Arial”> ... </p> . . .
  • 18. CSS Syntax selector { property : value; property2 : value2 } Example: p { font-family : “sans serif” } p { text-align: centery; color : red }
  • 19. Specifying Selectors ● Element name (e.g. <p>, <a> etc... } a { text-decoration: none } //represents the <a> elements ● Element Class (specified by class attribute) .reddish { color:red } div.reddish { background-color : red } Corresponds to the ff: <a class=”reddish”> <div class=”reddish”>
  • 20. Specifying Selectors ● Element ID (specified by id attribute #unique { border : 1px solid black } a#unico { display: block } Corresponds to <p id=”unique”> <a id=”unico”>
  • 21. Specifying Selectors ● Grouped Selector h1,h2,h3,h4,h5,h6,h7 { color: blue } ● Heirarchial Selector p a { text-decoration: none; color red; } // applies to: <a> elems inside <p>
  • 22. Specifying Selectors ● Element with Specific Attribute input[type=”text”] { border: 1px solid red } /* applies to <input type=”text”> elems, IE sucks on this dunno about IE 7 though */
  • 23. Specifying Selectors ● Pseudo-classes a:link { color: #FFFF00 } a:hover { color: rgb(123,234,54) } a:visited { color: salmon }
  • 24. CSS Properties and Their Values ● Background Properties ● Dimension ● Text ● Classification ● Font ● Positioning ● Border ● Print (CSS2 Media) ● Margin ● Aural (CSS2 Media) ● Padding ● List
  • 25. CSS Properties and Their Values ● Consult a CSS Reference for the different property names and their possible values.
  • 26. CSS Inheritance ● Most CSS properties are inheritable from more general selectors to more specific selectors ● When two properties conflict, the more specific rule is applied, otherwise the rules combine.
  • 27. Observe: /* CSS Rules */ <!-- HTML Markup--> a{ <a href=””>Link 1</a> font-family: “sans serif”; <div> color:red <a href=””>Link 2</a> } </div> div a { color:blue; text-decoration:none; }
  • 28.
  • 29. CSS Rule application: ● Browser Default ● External CSS ● Internal CSS ● Inline In terms of selector, the rules of the most specific selector that applies to an element overwrites any less specific declarations.
  • 30. XML + CSS = Web Page ● With any XML document, we can apply CSS to display it as web page. ● The selectors will be the elements of the XML documents.