SlideShare a Scribd company logo
Introduc)on	
  to	
  XHTML	
  and	
  CSS	
  

                Jussi	
  Pohjolainen	
  
    Tampere	
  University	
  of	
  Applied	
  Sciences	
  
EXTENSIBLE	
  MARKUP	
  LANGUAGE	
  
Extensible	
  Markup	
  Language	
  
•  XML	
  is	
  a	
  specifica)on	
  for	
  crea)ng	
  custom	
  
   markup	
  languages	
  
•  Subset	
  of	
  SGML	
  
•  XML	
  languages:	
  RSS,	
  MathML,	
  SVG,	
  XHTML	
  
•  W3C	
  Recommenda)on	
  
XML	
  and	
  SGML	
  
                                    SGML	
  



           XML	
  



RSS	
     XHTML	
     SVG	
                HTML	
  
XML	
  Example	
  
<?xml version=“1.0” encoding=“utf-8”?>!
<books>!
 !<book id=“A01”>!
 !!<title>Designing Web Usability</title>!
 !!<author>Jakob Nielsen</author>!
 !</book>!
</books>!
XML	
  Well	
  Formed	
  
•    XML	
  Declara)on	
  
•    One	
  root-­‐element	
  
•    Every	
  tag	
  is	
  opened	
  and	
  ended	
  
•    ASributes	
  inside	
  “	
  ”	
  
•    Case-­‐sensi)vity	
  
XML	
  Example	
  
<?xml version=“1.0” encoding=“utf-8”?>!
<!DOCTYPE books SYSTEM “books.dtd”>!
<books>!
 !<book id=“A01”>!
 !!<title>Designing Web Usability</title>!
 !!<author>Jakob Nielsen</author>!
 !<book>!
</books>!
DTD	
  Example:	
  books.dtd	
  
<!ELEMENT   books (book+)>!
<!ELEMENT   book (title, author)>!
<!ELEMENT   title (#PCDATA)>!
<!ELEMENT   author (#PCDATA)>!
<!ATTLIST   book id ID #REQUIRED>!
XML	
  Valid	
  
•  XML	
  document	
  is	
  valid,	
  when	
  it	
  follows	
  it’s	
  dtd	
  
•  Valida)on	
  can	
  be	
  done	
  only,	
  if	
  the	
  xml	
  
   document	
  has	
  dtd	
  (or	
  schema)	
  
•  XHTML	
  strict	
  1.0	
  dtd:	
  
    –  hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐
       strict.dtd	
  
EXTENSIBLE	
  HYPERTEXT	
  MARKUP	
  
LANGUAGE	
  
XHTML	
  
•  XHTML	
  is	
  a	
  XML	
  based	
  language	
  
•  XHTML	
  1.0	
  /	
  1.1:	
  
    –  Strict	
  
    –  Transi)onal	
  
    –  Frameset	
  
XHTML	
  Example	
  
<?xml version="1.0"?>!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"!
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">!
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  lang="en">!
 <head>!
 <meta http-equiv="Content-Type" content="text/html;
  charset=utf-8" />!
 <title>XHTML 1.0 Example</title>!
 </head>!
 <body>!
 <p>This is a example.</p>!
 </body>!
</html>!
General	
  Form	
  
•  XHTML	
  consists	
  of	
  
    –  Xml-­‐declara)on	
  
    –  Document	
  type	
  
    –  XHTML	
  -­‐	
  document	
  
        •  head	
  
        •  body	
  
XHTML	
  Basic	
  Structure	
  
•  Every	
  element	
  is	
  wriSen	
  in	
  lower	
  case	
  
•  If	
  element	
  does	
  not	
  contain	
  anything,	
  it’s	
  empty	
  element:	
  	
  
      –  <br></br>	
  <!–	
  line	
  break	
  -­‐-­‐>	
  
      –  <hr></hr>	
  <!–	
  horizontal	
  line	
  -­‐-­‐>	
  
      –  <img	
  src=”pic.jpg"	
  alt=”picture"></img>	
  <!-­‐-­‐	
  picture	
  -­‐-­‐>	
  
•  Empty	
  elements	
  should	
  be	
  wriSen	
  like	
  this:	
  
      –  <br/>	
  
      –  <hr/>	
  
      –  <img	
  src=”pic.jpg"	
  alt=”picture"/>	
  
Inden)ng	
  
•  Indenta)on	
  is	
  free	
  in	
  xml	
  
•  It’s	
  easier	
  to	
  read	
  the	
  document,	
  if	
  you	
  use	
  indenta)on	
  
•  One	
  indenta)on:	
  4	
  spaces:	
  

     <ul>
     ____<li>Carrot</li>
     ____<li>Tomato</li>
     </ul>
Commen)ng	
  
•  It’s	
  possible	
  to	
  add	
  comments	
  to	
  xhtml	
  –	
  
   documents:	
  
•  <!-­‐-­‐	
  and	
  here	
  we	
  have	
  a	
  list	
  -­‐-­‐>	
  
Document	
  types	
  
<!DOCTYPE	
  html	
  PUBLIC	
  "-­‐//W3C//DTD	
  XHTML	
  1.0	
  Strict//EN"	
  	
  "
   hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐strict.dtd">	
  

<!DOCTYPE	
  html	
  PUBLIC	
  "-­‐//W3C//DTD	
  XHTML	
  1.0	
  Transi)onal//EN"	
  "
   hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐transi)onal.dtd">a	
  

<!DOCTYPE	
  html	
  PUBLIC	
  "-­‐//W3C//DTD	
  XHTML	
  1.0	
  Frameset//EN"	
  "
   hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐frameset.dtd">	
  
Head	
  
•  Compulsary:	
  )tle	
  
•  Meta-­‐informa)on	
  	
  
    –  See:	
  
       hSp://www.cs.tut.fi/~jkorpela/webjulk/1.6.html	
  
•  Possible	
  linking	
  to	
  stylesheets	
  
Text	
  -­‐	
  elements	
  
•    p	
                            •    S	
  
•    br	
                           •    i	
  
•    blockquote	
                   •    b	
  
•    pre	
                          •    big	
  
•    em	
                           •    small	
  
•    strong	
                       •    sub	
  
•    code	
                         •    sup	
  
Lists	
  
•    ul:	
  unordered	
  list	
  
•    ol:	
  ordered	
  list	
  
•    dl:	
  defini)on	
  list	
  
•    ul	
  and	
  ol	
  items	
  are	
  marked	
  as	
  li	
  
•    In	
  dl	
  items	
  are	
  marked	
  as	
  dt	
  and	
  dd	
  
Links	
  
•  See:	
  
    –  hSp://www.cs.tut.fi/~jkorpela/webjulk/1.5.html	
  
•  Link	
  to	
  outside	
  
    –  <a	
  href="hSp://www.tamk.fi">tamk</a>	
  
•  Link	
  within	
  page	
  
    –  <a	
  href=”dog.html">Dog</a>	
  
Images	
  
•  Use	
  gif,	
  jpeg	
  or	
  png	
  
•  img-­‐element:	
  
     –  <img	
  src=”pic.jpg"	
  alt=”alterna)ve	
  text"/>	
  
•  Img	
  as	
  link	
  
     –  <a	
  href=”dog.html"><img	
  src=”dog.png"	
  
        alt=”dog"/></a>	
  
Tables	
  



Title    Title       Title
Cell     Cell        Cell
Cell     Cell        Cell
Tables	
  
<table>
    <tr>
         <td>cell</td>
         <td>cell</td>
    </tr>
    <tr>
          <td>cell</td>
          <td>cell</td>
    </tr>
</table>
Table:	
  Heading	
  
<table>
  <tr>
    <th>Name</th>
    <th>Telephone</th>
    <th>Telephone</th>
  </tr>
  <tr>
    <td>Bill Gates</td>
    <td>555 77 854</td>
    <td>555 77 855</td>
  </tr>
</table>
Combining	
  Rows	
  and	
  Cols	
  
<table>
   <tr>
     <td colspan="3">Title</td>
   </tr>
   <tr>
     <td>Title</td>
     <td colspan="2">cell</td>
   </tr>
   <tr>
     <td>cell</td>
     <td>cell</td>
     <td>cell</td>
   </tr>
</table>
CASCADING	
  STYLE	
  SHEETS	
  
CSS	
  
•  CSS	
  is	
  a	
  stylesheet	
  language	
  used	
  to	
  describe	
  
   the	
  presenta)on	
  of	
  a	
  document	
  wriSen	
  in	
  
   markup	
  language	
  
•  Usually	
  used	
  with	
  (x)html	
  
•  Defining	
  fonts,	
  colors	
  and	
  layout	
  
•  Separates	
  document	
  content	
  and	
  presenta)on	
  
History	
  
•  CSS1	
  spec	
  finished	
  1996,	
  it	
  took	
  three	
  years	
  before	
  
   browsers	
  supported	
  CSS1	
  
•  2000	
  IE	
  5.0	
  for	
  Mac	
  was	
  the	
  first	
  browser	
  to	
  fully	
  
   support	
  CSS1	
  
•  =>	
  CSS	
  Filtering	
  
•  S)ll	
  hundreds	
  of	
  bugs	
  in	
  browsers	
  
CSS	
  support	
  today	
  
•  Compe))on	
  
    –  Mozilla	
  Gecko	
  engine	
  (FireFox,	
  Mozilla)	
  
    –  Presto	
  Layout	
  engine	
  (Opera)	
  
    –  WebKit	
  (Apple	
  Safari,	
  Konquer,	
  S60	
  Browser)	
  
    –  Internet	
  Explorer	
  
•  CSS	
  and	
  browser	
  compa)bility:	
  
    –  hSp://www.quirksmode.org/css/contents.html	
  
Before	
  CSS	
  
•  Presenta)on	
  was	
  part	
  of	
  the	
  document	
  
   structure:	
  
    <h2 align="center">
      <font color="red" size="+4" face="Times New Roman, serif">
        <i>Usage of CSS</i>
      </font>
    </h2>

•  Many	
  problems…	
  
Using	
  CSS	
  
•  Structure	
  is	
  clear:	
  
    <h2>Usage of CSS</h2>
•  Presenta)on	
  is	
  clear:	
  
    h2 {
      text-align: center;
      color: red;
      font: italic large "Times New Roman", serif;
    }
CSS	
  Possibili)es	
  
•  Colors,	
  fonts,	
  layout,	
  sizes,	
  borders..	
  
•  Possible	
  to	
  do	
  different	
  css	
  –	
  files	
  for	
  prin)ng,	
  
   mobile	
  devices,	
  desktop	
  computers.	
  
•  See	
  	
  
    –  hSp://www.csszengarden.com/	
  
CSS	
  Linking	
  
<html>
 <head>
  <title>Page</title>
  <link rel="stylesheet"
         type="text/css"
         media="screen"
         href="screen.css" />
 </head>
 <body>
        <h1>Title</h1>
        <p>paragraph</p>
 </body>
</html>
CSS	
  Linking	
  
<html>
 <head>
  <title>Sivu</title>
  <link rel="stylesheet" type="text/css" media="screen"
href="screen.css" />
 <link rel="stylesheet" type="text/css" media="handheld"
href="mobile.css" />
  <link rel="stylesheet" type="text/css" media="print"
href="print.css" />
 </head>
 <body>
 <h1>Title</h1>
       <p>paragraph</p>
 </body>
</html>
CSS	
  General	
  Form	
  
•  CSS	
  general	
  form	
  
     –  selector	
  declara)on	
  
•  Example:	
  
     –  h1	
  {	
  color:	
  blue;	
  }	
  
•  h1	
  =	
  selector	
  
•  color:	
  blue;	
  =	
  declara)on	
  
Selectors	
  
•    Element	
  (h1)	
  
•    Class	
  (.important)	
  
•    Class	
  (h1.important)	
  
•    ID	
  (#important)	
  
•    Contextual	
  (h1	
  p)	
  
•    Pseudo	
  (a:link)	
  
Element	
  
•  XHTML:	
  
     <h1>Otsikko</h1>!
•  Css:	
  
     h1 {!
        color: RGB(255,0,0);!
     }!
Class	
  
•  XHTML:	
  
    <h1 class="tarkea">Otsikko</h1>!
    <p>Tässä tekstiä ja tämä <span
    class="tarkea">erityisen tärkeää
    tekstiä</span></p>!
    <p class="tarkea">Ja tämä vasta tärkeää
    onkin</p>!
•  Css:	
  
  .tarkea {!
     color: RGB(255,0,0);!
  }!
Class	
  
•  Css:	
  
      h1.tarkea {!
         color: RGB(255,0,0);!
      }!
ID	
  

•  XHTML:	
  
      <h1 id="paaotsikko">Otsikko</h1>!
•  Css:	
  
      #paaotsikko {!
         color: RGB(255,0,0);!
      }!
Contextual	
  
•  XHTML:	
  
      <ul>!
         <li>Porkkana</li>!
      </ul>!
•  Css:	
  
      ul li{!
         color: RGB(255,0,0);!
      }!
•  This	
  is	
  different!	
  
•      h1, p{!
         color: RGB(255,0,0);!
      }!
Pseudo	
  
•  Example:	
  
     <a href="http://www.tamk.fi/">TAMK</a>!


     a:link       {   color:   red; }!
     a:visited    {   color:   blue; }!
     a:active     {   color:   lime; }!
     a:hover      {   color:   green; }!
Font-­‐family	
  
•    sans-­‐serif,	
  example:	
  Helve)ca	
  
•    serif,	
  example:	
  Times	
  
•    cursive,	
  example:	
  Zapf-­‐Chancery	
  
•    fantasy,	
  example:	
  Impact	
  
•    monospace,	
  example:	
  Courier	
  
•    Example:	
  
     –  font-­‐family:	
  verdana,	
  arial,	
  sans-­‐serif	
  
font-­‐style,	
  font-­‐weight	
  
•  Font-­‐style	
  
     –  normal	
  (default),	
  italic,	
  oblique	
  
     –  example:	
  
            •  font-­‐style:	
  italic;	
  
•  Font-­‐weight:	
  
     –    normal,	
  bold,	
  bolder,	
  lighter,	
  100,	
  200	
  ...	
  900	
  
     –    normal	
  =	
  400	
  
     –    bold	
  =	
  700	
  
     –    bolder	
  and	
  lighter	
  
font-­‐size	
  
•  It’s	
  possible	
  to	
  define	
  the	
  font	
  size	
  absolutely,	
  
   rela)vely,	
  using	
  unit	
  of	
  length	
  or	
  by	
  
   percentage	
  
    –  font-size:      x-small;        /*   absolute */
    –  font-size:      larger;         /*   relative */
    –  font-size:      12pt;           /*   unit of length */
    –  font-size:      80%;            /*   percentage */
Colors	
  
color:   red;
color:   rgb(255,0,0);
color:   #FF0000;
color:   #F00;
Background	
  
•  Background	
  color:	
  
    –  background-­‐color:	
  #C0C0C0;	
  
•  Background	
  image:	
  
    –  background-­‐image:	
  url("marble.gif");	
  
    –  Repeat	
  
        •    repeat	
  (default):	
  repeat	
  both	
  direc)ons	
  
        •    repeat-­‐x:	
  repeat	
  horizontally	
  
        •    repeat-­‐y:	
  repeat	
  ver)cally	
  
        •    no-­‐repeat:	
  no	
  repeat	
  
    –  background-­‐aSachment:	
  fixed	
  |	
  scroll	
  
        •  Is	
  the	
  image	
  s)ll	
  or	
  does	
  it	
  move	
  when	
  scrolling	
  
Background	
  Image	
  Posi)on	
  
background-position:   right top;    /*   right upper-corner */
background-position:   100% 0%;      /*   right upper-corner */
background-position:   100%;         /*   right upper-corner */
background-position:   center bottom;/*   center bottom */
background-position:   50% 100%;     /*   center bottom */
background-position:   100%;         /*   right top */
background-position:   50% 10px;     /*   center 10 pixels from top */
Text	
  Features	
  
•  word-­‐spacing	
  
•  leSer-­‐spacing	
  
•  text-­‐decora)on	
  
   –  underline	
  
   –  overline	
  
   –  line-­‐through	
  
   –  blink	
  
Text	
  Features	
  
•  ver)cal-­‐align	
  
       –  baseline,	
  middle,	
  sub,	
  super,	
  text-­‐top,	
  text-­‐boSom,	
  top,	
  boSom,	
  
          prosenyluku	
  
•  text-­‐transform	
  
       –  capitalize,	
  uppercase,	
  lowercase	
  
•  text-­‐align	
  
     –  lez,	
  right,	
  center,	
  jus)fy	
  
•  text-­‐indent	
  
•  line-­‐height	
  

More Related Content

What's hot

Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Seble Nigussie
 
Html5
Html5 Html5
Html5
Shiva RamDam
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 
Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and Xhtml
Chhom Karath
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Seble Nigussie
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Seble Nigussie
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
Mahinda Gamage
 
HTML By K.Sasidhar
HTML By K.SasidharHTML By K.Sasidhar
HTML By K.Sasidhar
Sasidhar Kothuru
 
Html 5
Html 5Html 5
Elements of html powerpoint
Elements of html powerpointElements of html powerpoint
Elements of html powerpoint
Anastasia1993
 
html
htmlhtml
html
tumetr1
 
Intro to html revised2
Intro to html revised2Intro to html revised2
Intro to html revised2
mmvidanes29
 
Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
Umesh Agarwal
 
Html basic
Html basicHtml basic
Html basic
Viccky Khairnar
 
Html 5
Html 5Html 5
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
Trần Khải Hoàng
 

What's hot (20)

Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html5
Html5 Html5
Html5
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 
Html
HtmlHtml
Html
 
CSS
CSSCSS
CSS
 
HTML
HTMLHTML
HTML
 
Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and Xhtml
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
 
HTML By K.Sasidhar
HTML By K.SasidharHTML By K.Sasidhar
HTML By K.Sasidhar
 
Html 5
Html 5Html 5
Html 5
 
WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
 
Elements of html powerpoint
Elements of html powerpointElements of html powerpoint
Elements of html powerpoint
 
html
htmlhtml
html
 
Intro to html revised2
Intro to html revised2Intro to html revised2
Intro to html revised2
 
Kick start @ html5
Kick start @ html5Kick start @ html5
Kick start @ html5
 
Html basic
Html basicHtml basic
Html basic
 
Html 5
Html 5Html 5
Html 5
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 

Viewers also liked

mgmnt dev. and org. development
mgmnt dev. and org. developmentmgmnt dev. and org. development
mgmnt dev. and org. developmentumesh yadav
 
4 xslt
4   xslt4   xslt
4 xslt
gauravashq
 
HTML, CSS and XML
HTML, CSS and XMLHTML, CSS and XML
HTML, CSS and XML
Aashish Jain
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
Troy Miles
 
Google+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search InfluenceGoogle+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search Influence
Search Influence
 
SEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird EffectSEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird Effect
Robin Leonard
 
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Mark Traphagen
 
The science of landing pages
The science of landing pagesThe science of landing pages
The science of landing pages
Unbounce
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOSuite Solutions
 
OpenGL 4.4 Reference Card
OpenGL 4.4 Reference CardOpenGL 4.4 Reference Card
OpenGL 4.4 Reference Card
The Khronos Group Inc.
 
XML Avancé : DTD, XSD, XPATH, XSLT, XQuery
XML Avancé : DTD, XSD, XPATH, XSLT, XQueryXML Avancé : DTD, XSD, XPATH, XSLT, XQuery
XML Avancé : DTD, XSD, XPATH, XSLT, XQuery
Rachid NID SAID
 
Tables And SQL basics
Tables And SQL basicsTables And SQL basics
Tables And SQL basics
Amit Kumar Singh
 
2 dtd - validating xml documents
2   dtd - validating xml documents2   dtd - validating xml documents
2 dtd - validating xml documents
gauravashq
 
26 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 201326 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 2013
DreamGrow Digital
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - C
Jussi Pohjolainen
 
The Psychology of C# Analysis
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# Analysis
Coverity
 

Viewers also liked (20)

Tp2
Tp2Tp2
Tp2
 
mgmnt dev. and org. development
mgmnt dev. and org. developmentmgmnt dev. and org. development
mgmnt dev. and org. development
 
4 xslt
4   xslt4   xslt
4 xslt
 
Html ,css,xml
Html ,css,xmlHtml ,css,xml
Html ,css,xml
 
HTML, CSS and XML
HTML, CSS and XMLHTML, CSS and XML
HTML, CSS and XML
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
 
Google+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search InfluenceGoogle+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search Influence
 
Css3
Css3Css3
Css3
 
SEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird EffectSEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird Effect
 
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
 
The science of landing pages
The science of landing pagesThe science of landing pages
The science of landing pages
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FO
 
OpenGL 4.4 Reference Card
OpenGL 4.4 Reference CardOpenGL 4.4 Reference Card
OpenGL 4.4 Reference Card
 
XML Avancé : DTD, XSD, XPATH, XSLT, XQuery
XML Avancé : DTD, XSD, XPATH, XSLT, XQueryXML Avancé : DTD, XSD, XPATH, XSLT, XQuery
XML Avancé : DTD, XSD, XPATH, XSLT, XQuery
 
Tables And SQL basics
Tables And SQL basicsTables And SQL basics
Tables And SQL basics
 
2 dtd - validating xml documents
2   dtd - validating xml documents2   dtd - validating xml documents
2 dtd - validating xml documents
 
26 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 201326 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 2013
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - C
 
Copywriting
CopywritingCopywriting
Copywriting
 
The Psychology of C# Analysis
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# Analysis
 

Similar to Introduction to XML, XHTML and CSS

FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
Toni Kolev
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
smitha273566
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
smithaps4
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
Tadpole Collective
 
HTML
HTMLHTML
BITM3730 9-13.pptx
BITM3730 9-13.pptxBITM3730 9-13.pptx
BITM3730 9-13.pptx
MattMarino13
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
Sónia
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
Mukesh Kumar
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
vinita mathur
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
Arti Parab Academics
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
MattMarino13
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
Sean Wolfe
 

Similar to Introduction to XML, XHTML and CSS (20)

XHTML
XHTMLXHTML
XHTML
 
CSS
CSSCSS
CSS
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
Html and css
Html and cssHtml and css
Html and css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Css present
Css presentCss present
Css present
 
xhtml_css.ppt
xhtml_css.pptxhtml_css.ppt
xhtml_css.ppt
 
HTML
HTMLHTML
HTML
 
BITM3730 9-13.pptx
BITM3730 9-13.pptxBITM3730 9-13.pptx
BITM3730 9-13.pptx
 
ARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSSARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSS
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
Dhtml chapter2
Dhtml chapter2Dhtml chapter2
Dhtml chapter2
 

More from Jussi Pohjolainen

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
Jussi Pohjolainen
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
Jussi Pohjolainen
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
Jussi Pohjolainen
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
Jussi Pohjolainen
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
Jussi Pohjolainen
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
Jussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
Jussi Pohjolainen
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
Jussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
Jussi Pohjolainen
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
Jussi Pohjolainen
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
Jussi Pohjolainen
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
Jussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesJussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 

More from Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 

Recently uploaded

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 

Recently uploaded (20)

A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 

Introduction to XML, XHTML and CSS

  • 1. Introduc)on  to  XHTML  and  CSS   Jussi  Pohjolainen   Tampere  University  of  Applied  Sciences  
  • 3. Extensible  Markup  Language   •  XML  is  a  specifica)on  for  crea)ng  custom   markup  languages   •  Subset  of  SGML   •  XML  languages:  RSS,  MathML,  SVG,  XHTML   •  W3C  Recommenda)on  
  • 4. XML  and  SGML   SGML   XML   RSS   XHTML   SVG   HTML  
  • 5. XML  Example   <?xml version=“1.0” encoding=“utf-8”?>! <books>! !<book id=“A01”>! !!<title>Designing Web Usability</title>! !!<author>Jakob Nielsen</author>! !</book>! </books>!
  • 6. XML  Well  Formed   •  XML  Declara)on   •  One  root-­‐element   •  Every  tag  is  opened  and  ended   •  ASributes  inside  “  ”   •  Case-­‐sensi)vity  
  • 7. XML  Example   <?xml version=“1.0” encoding=“utf-8”?>! <!DOCTYPE books SYSTEM “books.dtd”>! <books>! !<book id=“A01”>! !!<title>Designing Web Usability</title>! !!<author>Jakob Nielsen</author>! !<book>! </books>!
  • 8. DTD  Example:  books.dtd   <!ELEMENT books (book+)>! <!ELEMENT book (title, author)>! <!ELEMENT title (#PCDATA)>! <!ELEMENT author (#PCDATA)>! <!ATTLIST book id ID #REQUIRED>!
  • 9. XML  Valid   •  XML  document  is  valid,  when  it  follows  it’s  dtd   •  Valida)on  can  be  done  only,  if  the  xml   document  has  dtd  (or  schema)   •  XHTML  strict  1.0  dtd:   –  hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐ strict.dtd  
  • 11. XHTML   •  XHTML  is  a  XML  based  language   •  XHTML  1.0  /  1.1:   –  Strict   –  Transi)onal   –  Frameset  
  • 12. XHTML  Example   <?xml version="1.0"?>! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">! <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">! <head>! <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />! <title>XHTML 1.0 Example</title>! </head>! <body>! <p>This is a example.</p>! </body>! </html>!
  • 13. General  Form   •  XHTML  consists  of   –  Xml-­‐declara)on   –  Document  type   –  XHTML  -­‐  document   •  head   •  body  
  • 14. XHTML  Basic  Structure   •  Every  element  is  wriSen  in  lower  case   •  If  element  does  not  contain  anything,  it’s  empty  element:     –  <br></br>  <!–  line  break  -­‐-­‐>   –  <hr></hr>  <!–  horizontal  line  -­‐-­‐>   –  <img  src=”pic.jpg"  alt=”picture"></img>  <!-­‐-­‐  picture  -­‐-­‐>   •  Empty  elements  should  be  wriSen  like  this:   –  <br/>   –  <hr/>   –  <img  src=”pic.jpg"  alt=”picture"/>  
  • 15. Inden)ng   •  Indenta)on  is  free  in  xml   •  It’s  easier  to  read  the  document,  if  you  use  indenta)on   •  One  indenta)on:  4  spaces:   <ul> ____<li>Carrot</li> ____<li>Tomato</li> </ul>
  • 16. Commen)ng   •  It’s  possible  to  add  comments  to  xhtml  –   documents:   •  <!-­‐-­‐  and  here  we  have  a  list  -­‐-­‐>  
  • 17. Document  types   <!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.0  Strict//EN"    " hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐strict.dtd">   <!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.0  Transi)onal//EN"  " hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐transi)onal.dtd">a   <!DOCTYPE  html  PUBLIC  "-­‐//W3C//DTD  XHTML  1.0  Frameset//EN"  " hSp://www.w3.org/TR/xhtml1/DTD/xhtml1-­‐frameset.dtd">  
  • 18. Head   •  Compulsary:  )tle   •  Meta-­‐informa)on     –  See:   hSp://www.cs.tut.fi/~jkorpela/webjulk/1.6.html   •  Possible  linking  to  stylesheets  
  • 19. Text  -­‐  elements   •  p   •  S   •  br   •  i   •  blockquote   •  b   •  pre   •  big   •  em   •  small   •  strong   •  sub   •  code   •  sup  
  • 20. Lists   •  ul:  unordered  list   •  ol:  ordered  list   •  dl:  defini)on  list   •  ul  and  ol  items  are  marked  as  li   •  In  dl  items  are  marked  as  dt  and  dd  
  • 21. Links   •  See:   –  hSp://www.cs.tut.fi/~jkorpela/webjulk/1.5.html   •  Link  to  outside   –  <a  href="hSp://www.tamk.fi">tamk</a>   •  Link  within  page   –  <a  href=”dog.html">Dog</a>  
  • 22. Images   •  Use  gif,  jpeg  or  png   •  img-­‐element:   –  <img  src=”pic.jpg"  alt=”alterna)ve  text"/>   •  Img  as  link   –  <a  href=”dog.html"><img  src=”dog.png"   alt=”dog"/></a>  
  • 23. Tables   Title Title Title Cell Cell Cell Cell Cell Cell
  • 24. Tables   <table> <tr> <td>cell</td> <td>cell</td> </tr> <tr> <td>cell</td> <td>cell</td> </tr> </table>
  • 25. Table:  Heading   <table> <tr> <th>Name</th> <th>Telephone</th> <th>Telephone</th> </tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table>
  • 26. Combining  Rows  and  Cols   <table> <tr> <td colspan="3">Title</td> </tr> <tr> <td>Title</td> <td colspan="2">cell</td> </tr> <tr> <td>cell</td> <td>cell</td> <td>cell</td> </tr> </table>
  • 28. CSS   •  CSS  is  a  stylesheet  language  used  to  describe   the  presenta)on  of  a  document  wriSen  in   markup  language   •  Usually  used  with  (x)html   •  Defining  fonts,  colors  and  layout   •  Separates  document  content  and  presenta)on  
  • 29. History   •  CSS1  spec  finished  1996,  it  took  three  years  before   browsers  supported  CSS1   •  2000  IE  5.0  for  Mac  was  the  first  browser  to  fully   support  CSS1   •  =>  CSS  Filtering   •  S)ll  hundreds  of  bugs  in  browsers  
  • 30. CSS  support  today   •  Compe))on   –  Mozilla  Gecko  engine  (FireFox,  Mozilla)   –  Presto  Layout  engine  (Opera)   –  WebKit  (Apple  Safari,  Konquer,  S60  Browser)   –  Internet  Explorer   •  CSS  and  browser  compa)bility:   –  hSp://www.quirksmode.org/css/contents.html  
  • 31. Before  CSS   •  Presenta)on  was  part  of  the  document   structure:   <h2 align="center"> <font color="red" size="+4" face="Times New Roman, serif"> <i>Usage of CSS</i> </font> </h2> •  Many  problems…  
  • 32. Using  CSS   •  Structure  is  clear:   <h2>Usage of CSS</h2> •  Presenta)on  is  clear:   h2 { text-align: center; color: red; font: italic large "Times New Roman", serif; }
  • 33. CSS  Possibili)es   •  Colors,  fonts,  layout,  sizes,  borders..   •  Possible  to  do  different  css  –  files  for  prin)ng,   mobile  devices,  desktop  computers.   •  See     –  hSp://www.csszengarden.com/  
  • 34. CSS  Linking   <html> <head> <title>Page</title> <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> </head> <body> <h1>Title</h1> <p>paragraph</p> </body> </html>
  • 35. CSS  Linking   <html> <head> <title>Sivu</title> <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> <link rel="stylesheet" type="text/css" media="handheld" href="mobile.css" /> <link rel="stylesheet" type="text/css" media="print" href="print.css" /> </head> <body> <h1>Title</h1> <p>paragraph</p> </body> </html>
  • 36. CSS  General  Form   •  CSS  general  form   –  selector  declara)on   •  Example:   –  h1  {  color:  blue;  }   •  h1  =  selector   •  color:  blue;  =  declara)on  
  • 37. Selectors   •  Element  (h1)   •  Class  (.important)   •  Class  (h1.important)   •  ID  (#important)   •  Contextual  (h1  p)   •  Pseudo  (a:link)  
  • 38. Element   •  XHTML:   <h1>Otsikko</h1>! •  Css:   h1 {! color: RGB(255,0,0);! }!
  • 39. Class   •  XHTML:   <h1 class="tarkea">Otsikko</h1>! <p>Tässä tekstiä ja tämä <span class="tarkea">erityisen tärkeää tekstiä</span></p>! <p class="tarkea">Ja tämä vasta tärkeää onkin</p>! •  Css:   .tarkea {! color: RGB(255,0,0);! }!
  • 40. Class   •  Css:   h1.tarkea {! color: RGB(255,0,0);! }!
  • 41. ID   •  XHTML:   <h1 id="paaotsikko">Otsikko</h1>! •  Css:   #paaotsikko {! color: RGB(255,0,0);! }!
  • 42. Contextual   •  XHTML:   <ul>! <li>Porkkana</li>! </ul>! •  Css:   ul li{! color: RGB(255,0,0);! }! •  This  is  different!   •  h1, p{! color: RGB(255,0,0);! }!
  • 43. Pseudo   •  Example:   <a href="http://www.tamk.fi/">TAMK</a>! a:link { color: red; }! a:visited { color: blue; }! a:active { color: lime; }! a:hover { color: green; }!
  • 44. Font-­‐family   •  sans-­‐serif,  example:  Helve)ca   •  serif,  example:  Times   •  cursive,  example:  Zapf-­‐Chancery   •  fantasy,  example:  Impact   •  monospace,  example:  Courier   •  Example:   –  font-­‐family:  verdana,  arial,  sans-­‐serif  
  • 45. font-­‐style,  font-­‐weight   •  Font-­‐style   –  normal  (default),  italic,  oblique   –  example:   •  font-­‐style:  italic;   •  Font-­‐weight:   –  normal,  bold,  bolder,  lighter,  100,  200  ...  900   –  normal  =  400   –  bold  =  700   –  bolder  and  lighter  
  • 46. font-­‐size   •  It’s  possible  to  define  the  font  size  absolutely,   rela)vely,  using  unit  of  length  or  by   percentage   –  font-size: x-small; /* absolute */ –  font-size: larger; /* relative */ –  font-size: 12pt; /* unit of length */ –  font-size: 80%; /* percentage */
  • 47. Colors   color: red; color: rgb(255,0,0); color: #FF0000; color: #F00;
  • 48. Background   •  Background  color:   –  background-­‐color:  #C0C0C0;   •  Background  image:   –  background-­‐image:  url("marble.gif");   –  Repeat   •  repeat  (default):  repeat  both  direc)ons   •  repeat-­‐x:  repeat  horizontally   •  repeat-­‐y:  repeat  ver)cally   •  no-­‐repeat:  no  repeat   –  background-­‐aSachment:  fixed  |  scroll   •  Is  the  image  s)ll  or  does  it  move  when  scrolling  
  • 49. Background  Image  Posi)on   background-position: right top; /* right upper-corner */ background-position: 100% 0%; /* right upper-corner */ background-position: 100%; /* right upper-corner */ background-position: center bottom;/* center bottom */ background-position: 50% 100%; /* center bottom */ background-position: 100%; /* right top */ background-position: 50% 10px; /* center 10 pixels from top */
  • 50. Text  Features   •  word-­‐spacing   •  leSer-­‐spacing   •  text-­‐decora)on   –  underline   –  overline   –  line-­‐through   –  blink  
  • 51. Text  Features   •  ver)cal-­‐align   –  baseline,  middle,  sub,  super,  text-­‐top,  text-­‐boSom,  top,  boSom,   prosenyluku   •  text-­‐transform   –  capitalize,  uppercase,  lowercase   •  text-­‐align   –  lez,  right,  center,  jus)fy   •  text-­‐indent   •  line-­‐height