SlideShare a Scribd company logo
INFT11/71-132
     Web Applications


HTML and XHTML
      Dr Michael Rees
School of Information Technology

      mrees@bond.edu.au
History of HTML

• HTML defined using SGML for the general layout of
  web pages

• HTML 4.01 – 1999

• XHTML 1.0 – 2000: HTML 4.01 defined using XML
   – Modular: Strict, Transitional, Frameset
   – Syntax can be validated at W3C

• XHTML 1.1 – 2001: Modularized 1.0, no frames

• HTML 5: to be the next standard


© 2009 Michael Rees                Web Applications   2
Hypertext Markup Language

• Text-based markup language for web pages

• Defines:
   – Page content: text, images, audio-visual, executable
     behaviour (JavaScript)
   – Page structure: different types of content (paragraphs,
     headings, lists, tables, links, and so on)
   – Page presentation: deprecated in favour of CSS

• HTML comprises:
          – Elements or tags, tag attributes, and content
          – Character entities: single special characters
          – Data types: URI, colour, ID, units, dates, encoding
© 2009 Michael Rees                 Web Applications              3
Dynamic HTML
• An old marketing term
• Browsers read (X)HTML to create an in-memory Document
  Object Model (DOM)
• JavaScript code within a web page is able to access and
  change the DOM contents
• Browsers detect DOM changes and immediately redisplay
  the content dynamically – hence the name
• Enables:
   – responsive graphical user interface controls
   – effects such as animation, drag and drop & so on
• Different browsers use different JavaScript notation for the
  DOM contents
© 2009 Michael Rees              Web Applications        4
HTML Components

• head tag
   – title (regard as mandatory)
   – styles
   – metadata—content description

• body tag—page content
   – headings
   – body paragraphs
   – lists
   – Tables

• JavaScript: in head or body
© 2009 Michael Rees              Web Applications   5
HTML Basics

• HTML consists of plain text interspersed with HTML tags

• tags are enclosed in ‗<‘ and ‗>‘ angle brackets
   – eg <title> or <head>, lowercase spelling is required in
     XHTML

• tags have content enclosed within start and ending forms:
   – <title> ...title text... </title>

• empty tags start and end in one tag:
          – <hr/> equivalent to <hr></hr>

• <!-- one or more lines of comment -->


© 2009 Michael Rees                 Web Applications    6
HTML Components
                                                               DTD Declaration


                                                           XML Namespace




                                                          Attribute, value in quotes


                                                                  Entity


                                                     Closed tag



                                                   Empty tag




© 2009 Michael Rees             Web Applications                                 7
Character Entities

• common characters ‗<‗, ‗>‗ and ‗&‘
          –     &lt; for <
          –     &gt; for >
          –     &amp; for &
          –     &copy; for © (ALT+0169)
          –     &nbsp; non-breaking space

• accented characters
          –     é is written &eacute;
          –     è is written &egrave;
          –     ñ is written &ntilde;
          –     æ is written &aelig;

© 2009 Michael Rees                     Web Applications   8
XHTML Lists
          <p>Academic Senate ... following matters:
          <ul>
           <li>the formulation and development of ...
           <li> regulatory provisions for ...
          </ul>
          <h2>Composition</h2>
          <dl>
           <dt>Executive Chancellor: ...
           <dt>Deans of Schools</dt>
          <dd>Business: ...
          <dd>Humanities ..
          </dl>


© 2009 Michael Rees                   Web Applications   9
Paragraph types

• <pre> ... </pre>
   – preformatted text in fixed-width font
   – spaces, tabs, newlines are significant

• <blockquote> ... </blockquote>
   – as <p> but indented left and right

• <address> ... </address>
   – italics
   – used for address and identification
     information, usually at end of document

© 2009 Michael Rees                Web Applications   10
Tables
• Tags for table building are:
   – <table> ... </table> whole table definition
   – <tr> ...</tr> surround a single row
   – <td> ...</td> surround a single cell in a row
   – <th> ... </th> surround a header (title) cell
   – <caption> ... </caption> surround heading and
     footing captions
• Tables may be nested within tables




© 2009 Michael Rees            Web Applications   11
Table Example

        <table border="1" >
        <tr align="center" valign="center">
         <th>Code</th>
         <th>Item</th>
         <th>Note</th>
         <th>Price</th>
        </tr>
        <tr>
         <td>P125</td>
         <td>Glucose Tester</td>
         <td>Pain-free</td>
         <td>$28.99</td>
        </tr>
        <tr>
         <td>D652</td>
         <td>Bandage Kit</td>
         <td>Long stick</td>
         <td>$8.95</td>
        </tr>
        </table>




© 2009 Michael Rees                           Web Applications   12
Container Tags

• Container tags allow a group of tags (page fragment)
  to be accessed as a single tag
   – Single id attribute
   – Apply style to whole container
   – Respond to events in whole container

• <div>
   – Always starts a new line in the page

• <span>
   – No line break
   – Words and characters within one line
© 2009 Michael Rees                Web Applications   13
Links

• Hyperlink to any web resource

• Specifies a resource address:
   – Pathname to file – relative link
   – URL – absolute link

• Uses the anchor <a> tag with an href attribute:
   – <a href=―http://www.bond.edu.au‖> Bond
     Uni</a>

• Set target within a page: <p id=―target‖></p>
  then use <a href=―#target‖>Target link</a>

© 2009 Michael Rees           Web Applications      14
Images
• Image specified with tag:
   – <img src="URL" alt="text description" />
   – SRC attribute: URL where image is located (can be
     anywhere)
   – ALT attribute: text displayed in special situations:
      • non-visual browsers: text shown instead of image
      • visual browsers: text shown while image loads
      • accessibility
• Supported image types:
   – GIF: Graphics Interchange Format
   – JPEG: Joint Photographic Experts Group
   – PNG: Portable Network Graphics
• Each image requires one additional request-response cycle

© 2009 Michael Rees            Web Applications               15
Resources

• Read Sections 2.1 through 2.8 of textbook




© 2009 Michael Rees               Web Applications   16

More Related Content

PPTX
INFT132 093 05 Cascading Style Sheets
PDF
Css 1. -_introduction_2010-11_
PDF
Html css
PPSX
Steph's Html5 and css presentation
PPTX
Dynamic HTML (DHTML)
PDF
How else does Adobe help in HTML5 development?
PPT
Unit 2 dhtml
INFT132 093 05 Cascading Style Sheets
Css 1. -_introduction_2010-11_
Html css
Steph's Html5 and css presentation
Dynamic HTML (DHTML)
How else does Adobe help in HTML5 development?
Unit 2 dhtml

What's hot (19)

PPTX
Howcssworks 100207024009-phpapp01
PPTX
Xhtml and html5 basics
PPTX
Dhtml
PPTX
Document Object Model (DOM)
PPTX
Xml applications
PDF
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
PPT
Css present
PPTX
Document object model(dom)
PPTX
Document object model
PPT
PPTX
PPTX
PPTX
Web dev
PPT
Document Object Model
PPTX
PPT
PPS
Howcssworks 100207024009-phpapp01
Xhtml and html5 basics
Dhtml
Document Object Model (DOM)
Xml applications
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
Css present
Document object model(dom)
Document object model
Web dev
Document Object Model
Ad

Viewers also liked (6)

PPT
ABC Gold Coast Social Media Talk
PPTX
Messing with MOOCs
PPTX
MOOCs march on
PDF
Developing Inside the Cloud
PPTX
Cloud Apps Survival Of The Fittest
PDF
Activity 25 reflecting on openness
ABC Gold Coast Social Media Talk
Messing with MOOCs
MOOCs march on
Developing Inside the Cloud
Cloud Apps Survival Of The Fittest
Activity 25 reflecting on openness
Ad

Similar to INFT132 093 04 HTML and XHTML (20)

PDF
HTML_DOM
PPTX
XML Document Object Model (DOM)
PPTX
The Semantic Web #2 - XML
PPTX
Unit iv xml dom
PPT
Document Object Model
PPT
PPTX
INFT132 093 07 Document Object Model
PDF
Unit 01 (1).pdf
PPT
Supplement web design
PDF
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
PPTX
RELAX NG to DTD and XSD Using the Open Toolkit
PPTX
Html and Xhtml
PPTX
Unit3wt
PPTX
Unit3wt
PPT
HTML_JavaScript_Malaysia_2008 (2).ppt
PPTX
Web technologies-course 02.pptx
PDF
Introduction to xml
PPTX
Introduction to HTML5 & CSS3
HTML_DOM
XML Document Object Model (DOM)
The Semantic Web #2 - XML
Unit iv xml dom
Document Object Model
INFT132 093 07 Document Object Model
Unit 01 (1).pdf
Supplement web design
Les Basiques - Web Développement HTML5, CSS3, JS et PHP
RELAX NG to DTD and XSD Using the Open Toolkit
Html and Xhtml
Unit3wt
Unit3wt
HTML_JavaScript_Malaysia_2008 (2).ppt
Web technologies-course 02.pptx
Introduction to xml
Introduction to HTML5 & CSS3

More from Michael Rees (20)

PPTX
Experiences with MOOCs: Challenges and Opportunities
PPTX
Virtualisation advances for teaching and research
PPTX
Building Classroom Community
PPTX
Teaching with Social Media
PPTX
Teaching with Social Media
PPTX
Cloud Apps Ascent - Snapshot
PPTX
INFT132 093 03 Web Concepts
PPTX
INFT132 093 02 Internet Concepts
PPT
Get Connected - Building a Social Media Roadmap
PPT
Favourite Cloud Apps
PPTX
Screencasting to Enhance Teaching Materials
PPTX
QCEC2009 Virtual IT Teaching Laboratory
PPT
Screencasting At Bond
PPT
Social Media Club Gold Coast Meeting 2 Intro
PPT
Working In The Cloud General Edition
PPT
Working in The Cloud - Michael Rees
PPT
Social Media Club Gold Coast Inaugural Meeting
PPT
Twitter Slides
PPT
Social Media Club Gold Coast Michael Rees Slides
PPT
For 2009
Experiences with MOOCs: Challenges and Opportunities
Virtualisation advances for teaching and research
Building Classroom Community
Teaching with Social Media
Teaching with Social Media
Cloud Apps Ascent - Snapshot
INFT132 093 03 Web Concepts
INFT132 093 02 Internet Concepts
Get Connected - Building a Social Media Roadmap
Favourite Cloud Apps
Screencasting to Enhance Teaching Materials
QCEC2009 Virtual IT Teaching Laboratory
Screencasting At Bond
Social Media Club Gold Coast Meeting 2 Intro
Working In The Cloud General Edition
Working in The Cloud - Michael Rees
Social Media Club Gold Coast Inaugural Meeting
Twitter Slides
Social Media Club Gold Coast Michael Rees Slides
For 2009

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Complications of Minimal Access Surgery at WLH
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
Pre independence Education in Inndia.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
PPTX
Institutional Correction lecture only . . .
PDF
Classroom Observation Tools for Teachers
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
GDM (1) (1).pptx small presentation for students
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Insiders guide to clinical Medicine.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Supply Chain Operations Speaking Notes -ICLT Program
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Complications of Minimal Access Surgery at WLH
O5-L3 Freight Transport Ops (International) V1.pdf
Basic Mud Logging Guide for educational purpose
Pre independence Education in Inndia.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.
Institutional Correction lecture only . . .
Classroom Observation Tools for Teachers
Anesthesia in Laparoscopic Surgery in India
Pharmacology of Heart Failure /Pharmacotherapy of CHF
GDM (1) (1).pptx small presentation for students
STATICS OF THE RIGID BODIES Hibbelers.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Insiders guide to clinical Medicine.pdf

INFT132 093 04 HTML and XHTML

  • 1. INFT11/71-132 Web Applications HTML and XHTML Dr Michael Rees School of Information Technology mrees@bond.edu.au
  • 2. History of HTML • HTML defined using SGML for the general layout of web pages • HTML 4.01 – 1999 • XHTML 1.0 – 2000: HTML 4.01 defined using XML – Modular: Strict, Transitional, Frameset – Syntax can be validated at W3C • XHTML 1.1 – 2001: Modularized 1.0, no frames • HTML 5: to be the next standard © 2009 Michael Rees Web Applications 2
  • 3. Hypertext Markup Language • Text-based markup language for web pages • Defines: – Page content: text, images, audio-visual, executable behaviour (JavaScript) – Page structure: different types of content (paragraphs, headings, lists, tables, links, and so on) – Page presentation: deprecated in favour of CSS • HTML comprises: – Elements or tags, tag attributes, and content – Character entities: single special characters – Data types: URI, colour, ID, units, dates, encoding © 2009 Michael Rees Web Applications 3
  • 4. Dynamic HTML • An old marketing term • Browsers read (X)HTML to create an in-memory Document Object Model (DOM) • JavaScript code within a web page is able to access and change the DOM contents • Browsers detect DOM changes and immediately redisplay the content dynamically – hence the name • Enables: – responsive graphical user interface controls – effects such as animation, drag and drop & so on • Different browsers use different JavaScript notation for the DOM contents © 2009 Michael Rees Web Applications 4
  • 5. HTML Components • head tag – title (regard as mandatory) – styles – metadata—content description • body tag—page content – headings – body paragraphs – lists – Tables • JavaScript: in head or body © 2009 Michael Rees Web Applications 5
  • 6. HTML Basics • HTML consists of plain text interspersed with HTML tags • tags are enclosed in ‗<‘ and ‗>‘ angle brackets – eg <title> or <head>, lowercase spelling is required in XHTML • tags have content enclosed within start and ending forms: – <title> ...title text... </title> • empty tags start and end in one tag: – <hr/> equivalent to <hr></hr> • <!-- one or more lines of comment --> © 2009 Michael Rees Web Applications 6
  • 7. HTML Components DTD Declaration XML Namespace Attribute, value in quotes Entity Closed tag Empty tag © 2009 Michael Rees Web Applications 7
  • 8. Character Entities • common characters ‗<‗, ‗>‗ and ‗&‘ – &lt; for < – &gt; for > – &amp; for & – &copy; for © (ALT+0169) – &nbsp; non-breaking space • accented characters – é is written &eacute; – è is written &egrave; – ñ is written &ntilde; – æ is written &aelig; © 2009 Michael Rees Web Applications 8
  • 9. XHTML Lists <p>Academic Senate ... following matters: <ul> <li>the formulation and development of ... <li> regulatory provisions for ... </ul> <h2>Composition</h2> <dl> <dt>Executive Chancellor: ... <dt>Deans of Schools</dt> <dd>Business: ... <dd>Humanities .. </dl> © 2009 Michael Rees Web Applications 9
  • 10. Paragraph types • <pre> ... </pre> – preformatted text in fixed-width font – spaces, tabs, newlines are significant • <blockquote> ... </blockquote> – as <p> but indented left and right • <address> ... </address> – italics – used for address and identification information, usually at end of document © 2009 Michael Rees Web Applications 10
  • 11. Tables • Tags for table building are: – <table> ... </table> whole table definition – <tr> ...</tr> surround a single row – <td> ...</td> surround a single cell in a row – <th> ... </th> surround a header (title) cell – <caption> ... </caption> surround heading and footing captions • Tables may be nested within tables © 2009 Michael Rees Web Applications 11
  • 12. Table Example <table border="1" > <tr align="center" valign="center"> <th>Code</th> <th>Item</th> <th>Note</th> <th>Price</th> </tr> <tr> <td>P125</td> <td>Glucose Tester</td> <td>Pain-free</td> <td>$28.99</td> </tr> <tr> <td>D652</td> <td>Bandage Kit</td> <td>Long stick</td> <td>$8.95</td> </tr> </table> © 2009 Michael Rees Web Applications 12
  • 13. Container Tags • Container tags allow a group of tags (page fragment) to be accessed as a single tag – Single id attribute – Apply style to whole container – Respond to events in whole container • <div> – Always starts a new line in the page • <span> – No line break – Words and characters within one line © 2009 Michael Rees Web Applications 13
  • 14. Links • Hyperlink to any web resource • Specifies a resource address: – Pathname to file – relative link – URL – absolute link • Uses the anchor <a> tag with an href attribute: – <a href=―http://www.bond.edu.au‖> Bond Uni</a> • Set target within a page: <p id=―target‖></p> then use <a href=―#target‖>Target link</a> © 2009 Michael Rees Web Applications 14
  • 15. Images • Image specified with tag: – <img src="URL" alt="text description" /> – SRC attribute: URL where image is located (can be anywhere) – ALT attribute: text displayed in special situations: • non-visual browsers: text shown instead of image • visual browsers: text shown while image loads • accessibility • Supported image types: – GIF: Graphics Interchange Format – JPEG: Joint Photographic Experts Group – PNG: Portable Network Graphics • Each image requires one additional request-response cycle © 2009 Michael Rees Web Applications 15
  • 16. Resources • Read Sections 2.1 through 2.8 of textbook © 2009 Michael Rees Web Applications 16