SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Mobile Website Development
XHTML and CSS
Facilitated by:
Michael Wakahe
Tawi Commercial
Services Ltd
Jul 2011
Table of Contents
 XHTML MP
 CSS
 JSP
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 XHTML MP = XHTML Mobile Profile
 XHTML uses the tag set of HTML and enforces the
rigorous syntax requirements of XML
 XHTML-MP is currently considered the de facto
standard language for Mobile Web development
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 XHTML 1.0 Reference (not XHTML MP 1.0):
http://www.w3.org/TR/2000/REC-xhtml1-20000126/
• XHTML MP 1.0 Document Type Definition (DTD):
http://www.wapforum.org/DTD/xhtml-mobile10.dtd
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML Declaration, above. XHTML-MP is XML.-->
<!-- DOCTYPE declaring that this document is XHTML-MP. -->
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<!-- The rest of this document looks a lot like desktop HTML. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Externally Linked Stylesheet-->
<!-- <link rel="stylesheet" href=“css/style1.css" type="text/css" /> -->
<title>Annotated XHTML Example</title>
</head>
<body>
<div class="hdr">Annotated XHTML Example</div>
</body>
</html>
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
XHTML Element Reason for Exclusion
frame, frameset, iframe,
noframes
Frames have significant browser memory
requirements, including new
DOM instances. Frames are not usable on small
screens.
applet Java applets are not supported in mobile browsers
or natively on mobile
devices. Java SE is not supported on mobile
devices.
area, map Image maps are not supported nor easy to use on
mobile devices.
basefont Specify default font styles using CSS.
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML Elements Unsupported in XHTML-MP
XHTML MP
XHTML Element Reason for Exclusion
bdo Bidirectional text is not supported.
button Use <input type="submit"> for push buttons.
center Use CSS to align page elements.
col, colgroup Only basic tables are supported. See the next section for
details.
del, ins, s, strike Use CSS to style text to appear as deleted from, inserted into,
or struck from the document.
dir, menu Use CSS to style text to appear as directory or menu lists.
font Use CSS to specify font styles.
legend Basic forms are supported. Legends are not supported in
fieldsets.
noscript, script Supported only in XHTML-MP 1.1 and later.
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
XHTML Element Reason for Exclusion
sub, sup Mobile devices provide limited fonts. Subscripts and
superscripts are supported.
tbody, tfoot, thead Basic tables are supported. Grouping table header, body and
footer elements is not supported.
tt Use CSS to style text to appear as teletype text.
u Underlining is a universal indicator of link labels. Underlined
text that is not a link is not usable on small screens and
strongly discouraged. However, if underlining is absolutely
required, it may be accomplished using the text-decoration:
underline; CSS directive.
xmp Use CSS or the pre element to style text to appear
preformatted.
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 The tel: URI schemes allow mobile users to click a
link to initiate a phone call.
 Format of a tel: URI is tel:<phone number>
 Example: Call <a href="tel:+254-722–321-
1212">+254-722–321-1212</a> for Information
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 The wtai: scheme is used to initiate phone calls and
add contact phone numbers to the mobile device’s
address book
 Uses a different URI format for each task
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 Format for initiating a phone call from the mobile
device: wtai://wp/mc;<phone number>
 To add a contact into the mobile address book:
wtai://wp/ap;<phone number>;<name>
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 Examples:
Call <a href="wtai://wp/mc;+254728321987">+254-728–
321-1987</a> for Information
<a ref="wtai://wp/ap;+254728321987;Information">Add to
Address Book</a>
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 XHTML-MP 1.1 adds support for the <script> and
<noscript> tags
 The markup snippet below imports an external
JavaScript file into an XHTML-MP document:
<script type="text/javascript" src="js/library.js" />
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 An example of a JavaScript function declared inline in
a XHTML-MP 1.1 document:
<script type="text/javascript">
function handleOnClick() {
// Get the new image URL
var newSrc = "img/michael_icon.png";
// Update the image URL
document.getElementById("theImg").src = newSrc;
}
</script>
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 Below, an XHTML-MP image tag associates the inline
JavaScript function above with its onclick event:
<img id="theImg" src="/logo.png"width="140" height="50"
alt="Logo“ onclick=“handleOnClick();"/>
 The MIME type text/javascript must be used to identify
JavaScript and ECMAScript MP in XHTML-MP 1.1 markup
documents.
 XHTML-MP 1.2 is a new standard, adopted in March 2008
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 Other topics in XHTML MP (see examples):
Forms, Tables, Links and Access Keys
 Many examples at the following link:
http://www.developershome.com/wap/xhtmlmp
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
CSS
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Wireless CSS
/*
This is a Wireless CSS file.
*/
h1 {
color: blue
}
p {
font-style: italic
}
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Sample Wireless CSS
Wireless CSS
 CSS = Cascading Style Sheets
 Used to define presentation including layouts,
colours & fonts
 Can use either Wireless CSS or CSS Mobile Profile
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Wireless CSS
 Both mobile CSS subsets support core CSS syntax and
properties including selectors, inheritance, the box
model, shorthand properties, generic font families,
and absolute and relative font sizes.
 Both mobile dialects comply with existing CSS syntax
standards and can be validated with a CSS validator.
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Wireless CSS
 A CSS statement is consisted of a selector, a property,
and a property value: selector {property:
property_value}
 Example: p {text-align: right}
 Multiple properties are separated with a semicolon:
selector {property1: property_value1; property2:
property_value2; ... propertyN: property_valueN}
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Wireless CSS
 Example of multiple properties: p {text-align: right;
color: blue}
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
Wireless CSS
 CSS Mobile Profile 1.0 Specification:
http://www.w3.org/TR/2002/CR-css-mobile-20020725
 CSS 2 Specification:
http://www.w3.org/TR/2008/REC-CSS2-20080411/
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
JSP and
Servlets
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
 You can also introduce JSP and servlet technology to
XHTML MP similar to the way we did it in WML.
 Remember to save files as .jsp as well as to specify
the MIME type: application/vnd.wap.xhtml+xml
 Sample in next slide
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
XHTML MP
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<% response.setContentType("application/vnd.wap.xhtml+xml;charset=UTF-8"); %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- <link rel="stylesheet" href="css/style1.css" type="text/css" /> -->
<title>Annotated XHTML Example</title>
</head>
<body>
<p>An XHTML JSP Example</p>
<% out.println("<p>My name is Michael</p>"); %>
</body>
</html>
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.
The End
Michael Wakahe
michael@tawi.mobi
+254 (0)20 250 9260
www.tawi.mobi
Copyright © Tawi Commercial Services Ltd. 2015. All Rights
Reserved.

Weitere ähnliche Inhalte

Ähnlich wie XHTML and CSS

What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtmlFkdiMl
 
Web development intership Presentation.pptx
Web development intership Presentation.pptxWeb development intership Presentation.pptx
Web development intership Presentation.pptxbodepallivamsi1122
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Paxcel Technologies
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
Vskills angular js sample material
Vskills angular js sample materialVskills angular js sample material
Vskills angular js sample materialVskills
 
1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt1. Introduction to HTML5.ppt
1. Introduction to HTML5.pptJyothiAmpally
 
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTESSony235240
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentationJohnLagman3
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Manav Prasad
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5IT Geeks
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented ArchitectureLuqman Shareef
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55subrat55
 
Html5 Introduction
Html5 IntroductionHtml5 Introduction
Html5 IntroductionManoj Kumar
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and DevelopmentShagor Ahmed
 
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSWeb Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSRSolutions
 

Ähnlich wie XHTML and CSS (20)

HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtml
 
Web development intership Presentation.pptx
Web development intership Presentation.pptxWeb development intership Presentation.pptx
Web development intership Presentation.pptx
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
Class2
Class2Class2
Class2
 
Vskills angular js sample material
Vskills angular js sample materialVskills angular js sample material
Vskills angular js sample material
 
1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt1. Introduction to HTML5.ppt
1. Introduction to HTML5.ppt
 
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
1._Introduction_to_HTML5[1].MCA MODULE 1 NOTES
 
1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation1._Introduction_to_HTML5 powerpoint presentation
1._Introduction_to_HTML5 powerpoint presentation
 
CSS
CSSCSS
CSS
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Xhtml
XhtmlXhtml
Xhtml
 
Introduction to html55
Introduction to html55Introduction to html55
Introduction to html55
 
Html5 Introduction
Html5 IntroductionHtml5 Introduction
Html5 Introduction
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
 
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONSWeb Development Course - HTML5 & CSS3 by RSOLUTIONS
Web Development Course - HTML5 & CSS3 by RSOLUTIONS
 

Mehr von tawi123

Overview of Java
Overview of JavaOverview of Java
Overview of Javatawi123
 
Mobile Internet Best Practices
Mobile Internet Best PracticesMobile Internet Best Practices
Mobile Internet Best Practicestawi123
 
Introduction to SMS, MMS, Modems & Gateways
Introduction to SMS, MMS, Modems & GatewaysIntroduction to SMS, MMS, Modems & Gateways
Introduction to SMS, MMS, Modems & Gatewaystawi123
 
Introduction to Mobile Internet
Introduction to Mobile InternetIntroduction to Mobile Internet
Introduction to Mobile Internettawi123
 
Mobile Website Development
Mobile Website DevelopmentMobile Website Development
Mobile Website Developmenttawi123
 
Linux, PHP, SMS - USSD Examination
Linux, PHP,  SMS - USSD ExaminationLinux, PHP,  SMS - USSD Examination
Linux, PHP, SMS - USSD Examinationtawi123
 
Workstation Exercises
Workstation ExercisesWorkstation Exercises
Workstation Exercisestawi123
 
Work Injury Benefits Act 2007
Work Injury Benefits Act 2007Work Injury Benefits Act 2007
Work Injury Benefits Act 2007tawi123
 
The Kenya Information and Communications Consumer Protection Regulations 2010
The Kenya Information and Communications Consumer Protection Regulations 2010The Kenya Information and Communications Consumer Protection Regulations 2010
The Kenya Information and Communications Consumer Protection Regulations 2010tawi123
 
Tax KRA Compliance Certificate
Tax KRA Compliance CertificateTax KRA Compliance Certificate
Tax KRA Compliance Certificatetawi123
 
Tawi Staff Handbook 2015
Tawi Staff Handbook 2015Tawi Staff Handbook 2015
Tawi Staff Handbook 2015tawi123
 
Tawi SMS-USSD Customer Agreement
Tawi SMS-USSD Customer AgreementTawi SMS-USSD Customer Agreement
Tawi SMS-USSD Customer Agreementtawi123
 
Tawi SMS Application Form - SMS Short Code
Tawi SMS Application Form - SMS Short CodeTawi SMS Application Form - SMS Short Code
Tawi SMS Application Form - SMS Short Codetawi123
 
Tawi Product Overview
Tawi Product OverviewTawi Product Overview
Tawi Product Overviewtawi123
 
Tawi SMS Application Form - Sender Id
Tawi SMS Application Form - Sender IdTawi SMS Application Form - Sender Id
Tawi SMS Application Form - Sender Idtawi123
 
Tawi Nairobi City County License 2015
Tawi Nairobi City County License 2015Tawi Nairobi City County License 2015
Tawi Nairobi City County License 2015tawi123
 
Tawi NSSF Registration
Tawi NSSF RegistrationTawi NSSF Registration
Tawi NSSF Registrationtawi123
 
Tawi tax KRA Certificate
Tawi tax KRA CertificateTawi tax KRA Certificate
Tawi tax KRA Certificatetawi123
 
Tawi FKE Certificate of Membership 2014
Tawi FKE Certificate of Membership 2014Tawi FKE Certificate of Membership 2014
Tawi FKE Certificate of Membership 2014tawi123
 
Tawi Fire Clearance Certificate 2015
Tawi Fire Clearance Certificate 2015Tawi Fire Clearance Certificate 2015
Tawi Fire Clearance Certificate 2015tawi123
 

Mehr von tawi123 (20)

Overview of Java
Overview of JavaOverview of Java
Overview of Java
 
Mobile Internet Best Practices
Mobile Internet Best PracticesMobile Internet Best Practices
Mobile Internet Best Practices
 
Introduction to SMS, MMS, Modems & Gateways
Introduction to SMS, MMS, Modems & GatewaysIntroduction to SMS, MMS, Modems & Gateways
Introduction to SMS, MMS, Modems & Gateways
 
Introduction to Mobile Internet
Introduction to Mobile InternetIntroduction to Mobile Internet
Introduction to Mobile Internet
 
Mobile Website Development
Mobile Website DevelopmentMobile Website Development
Mobile Website Development
 
Linux, PHP, SMS - USSD Examination
Linux, PHP,  SMS - USSD ExaminationLinux, PHP,  SMS - USSD Examination
Linux, PHP, SMS - USSD Examination
 
Workstation Exercises
Workstation ExercisesWorkstation Exercises
Workstation Exercises
 
Work Injury Benefits Act 2007
Work Injury Benefits Act 2007Work Injury Benefits Act 2007
Work Injury Benefits Act 2007
 
The Kenya Information and Communications Consumer Protection Regulations 2010
The Kenya Information and Communications Consumer Protection Regulations 2010The Kenya Information and Communications Consumer Protection Regulations 2010
The Kenya Information and Communications Consumer Protection Regulations 2010
 
Tax KRA Compliance Certificate
Tax KRA Compliance CertificateTax KRA Compliance Certificate
Tax KRA Compliance Certificate
 
Tawi Staff Handbook 2015
Tawi Staff Handbook 2015Tawi Staff Handbook 2015
Tawi Staff Handbook 2015
 
Tawi SMS-USSD Customer Agreement
Tawi SMS-USSD Customer AgreementTawi SMS-USSD Customer Agreement
Tawi SMS-USSD Customer Agreement
 
Tawi SMS Application Form - SMS Short Code
Tawi SMS Application Form - SMS Short CodeTawi SMS Application Form - SMS Short Code
Tawi SMS Application Form - SMS Short Code
 
Tawi Product Overview
Tawi Product OverviewTawi Product Overview
Tawi Product Overview
 
Tawi SMS Application Form - Sender Id
Tawi SMS Application Form - Sender IdTawi SMS Application Form - Sender Id
Tawi SMS Application Form - Sender Id
 
Tawi Nairobi City County License 2015
Tawi Nairobi City County License 2015Tawi Nairobi City County License 2015
Tawi Nairobi City County License 2015
 
Tawi NSSF Registration
Tawi NSSF RegistrationTawi NSSF Registration
Tawi NSSF Registration
 
Tawi tax KRA Certificate
Tawi tax KRA CertificateTawi tax KRA Certificate
Tawi tax KRA Certificate
 
Tawi FKE Certificate of Membership 2014
Tawi FKE Certificate of Membership 2014Tawi FKE Certificate of Membership 2014
Tawi FKE Certificate of Membership 2014
 
Tawi Fire Clearance Certificate 2015
Tawi Fire Clearance Certificate 2015Tawi Fire Clearance Certificate 2015
Tawi Fire Clearance Certificate 2015
 

Kürzlich hochgeladen

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Kürzlich hochgeladen (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

XHTML and CSS

  • 1. Mobile Website Development XHTML and CSS Facilitated by: Michael Wakahe Tawi Commercial Services Ltd Jul 2011
  • 2. Table of Contents  XHTML MP  CSS  JSP Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 3. XHTML MP Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 4. XHTML MP  XHTML MP = XHTML Mobile Profile  XHTML uses the tag set of HTML and enforces the rigorous syntax requirements of XML  XHTML-MP is currently considered the de facto standard language for Mobile Web development Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 5. XHTML MP  XHTML 1.0 Reference (not XHTML MP 1.0): http://www.w3.org/TR/2000/REC-xhtml1-20000126/ • XHTML MP 1.0 Document Type Definition (DTD): http://www.wapforum.org/DTD/xhtml-mobile10.dtd Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 6. XHTML MP <?xml version="1.0" encoding="UTF-8"?> <!-- XML Declaration, above. XHTML-MP is XML.--> <!-- DOCTYPE declaring that this document is XHTML-MP. --> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <!-- The rest of this document looks a lot like desktop HTML. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Externally Linked Stylesheet--> <!-- <link rel="stylesheet" href=“css/style1.css" type="text/css" /> --> <title>Annotated XHTML Example</title> </head> <body> <div class="hdr">Annotated XHTML Example</div> </body> </html> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 7. XHTML MP XHTML Element Reason for Exclusion frame, frameset, iframe, noframes Frames have significant browser memory requirements, including new DOM instances. Frames are not usable on small screens. applet Java applets are not supported in mobile browsers or natively on mobile devices. Java SE is not supported on mobile devices. area, map Image maps are not supported nor easy to use on mobile devices. basefont Specify default font styles using CSS. Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved. XHTML Elements Unsupported in XHTML-MP
  • 8. XHTML MP XHTML Element Reason for Exclusion bdo Bidirectional text is not supported. button Use <input type="submit"> for push buttons. center Use CSS to align page elements. col, colgroup Only basic tables are supported. See the next section for details. del, ins, s, strike Use CSS to style text to appear as deleted from, inserted into, or struck from the document. dir, menu Use CSS to style text to appear as directory or menu lists. font Use CSS to specify font styles. legend Basic forms are supported. Legends are not supported in fieldsets. noscript, script Supported only in XHTML-MP 1.1 and later. Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 9. XHTML MP XHTML Element Reason for Exclusion sub, sup Mobile devices provide limited fonts. Subscripts and superscripts are supported. tbody, tfoot, thead Basic tables are supported. Grouping table header, body and footer elements is not supported. tt Use CSS to style text to appear as teletype text. u Underlining is a universal indicator of link labels. Underlined text that is not a link is not usable on small screens and strongly discouraged. However, if underlining is absolutely required, it may be accomplished using the text-decoration: underline; CSS directive. xmp Use CSS or the pre element to style text to appear preformatted. Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 10. XHTML MP  The tel: URI schemes allow mobile users to click a link to initiate a phone call.  Format of a tel: URI is tel:<phone number>  Example: Call <a href="tel:+254-722–321- 1212">+254-722–321-1212</a> for Information Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 11. XHTML MP  The wtai: scheme is used to initiate phone calls and add contact phone numbers to the mobile device’s address book  Uses a different URI format for each task Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 12. XHTML MP  Format for initiating a phone call from the mobile device: wtai://wp/mc;<phone number>  To add a contact into the mobile address book: wtai://wp/ap;<phone number>;<name> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 13. XHTML MP  Examples: Call <a href="wtai://wp/mc;+254728321987">+254-728– 321-1987</a> for Information <a ref="wtai://wp/ap;+254728321987;Information">Add to Address Book</a> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 14. XHTML MP  XHTML-MP 1.1 adds support for the <script> and <noscript> tags  The markup snippet below imports an external JavaScript file into an XHTML-MP document: <script type="text/javascript" src="js/library.js" /> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 15. XHTML MP  An example of a JavaScript function declared inline in a XHTML-MP 1.1 document: <script type="text/javascript"> function handleOnClick() { // Get the new image URL var newSrc = "img/michael_icon.png"; // Update the image URL document.getElementById("theImg").src = newSrc; } </script> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 16. XHTML MP  Below, an XHTML-MP image tag associates the inline JavaScript function above with its onclick event: <img id="theImg" src="/logo.png"width="140" height="50" alt="Logo“ onclick=“handleOnClick();"/>  The MIME type text/javascript must be used to identify JavaScript and ECMAScript MP in XHTML-MP 1.1 markup documents.  XHTML-MP 1.2 is a new standard, adopted in March 2008 Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 17. XHTML MP  Other topics in XHTML MP (see examples): Forms, Tables, Links and Access Keys  Many examples at the following link: http://www.developershome.com/wap/xhtmlmp Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 18. CSS Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 19. Wireless CSS /* This is a Wireless CSS file. */ h1 { color: blue } p { font-style: italic } Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved. Sample Wireless CSS
  • 20. Wireless CSS  CSS = Cascading Style Sheets  Used to define presentation including layouts, colours & fonts  Can use either Wireless CSS or CSS Mobile Profile Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 21. Wireless CSS  Both mobile CSS subsets support core CSS syntax and properties including selectors, inheritance, the box model, shorthand properties, generic font families, and absolute and relative font sizes.  Both mobile dialects comply with existing CSS syntax standards and can be validated with a CSS validator. Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 22. Wireless CSS  A CSS statement is consisted of a selector, a property, and a property value: selector {property: property_value}  Example: p {text-align: right}  Multiple properties are separated with a semicolon: selector {property1: property_value1; property2: property_value2; ... propertyN: property_valueN} Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 23. Wireless CSS  Example of multiple properties: p {text-align: right; color: blue} Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 24. Wireless CSS  CSS Mobile Profile 1.0 Specification: http://www.w3.org/TR/2002/CR-css-mobile-20020725  CSS 2 Specification: http://www.w3.org/TR/2008/REC-CSS2-20080411/ Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 25. JSP and Servlets Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 26. XHTML MP  You can also introduce JSP and servlet technology to XHTML MP similar to the way we did it in WML.  Remember to save files as .jsp as well as to specify the MIME type: application/vnd.wap.xhtml+xml  Sample in next slide Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 27. XHTML MP <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <% response.setContentType("application/vnd.wap.xhtml+xml;charset=UTF-8"); %> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- <link rel="stylesheet" href="css/style1.css" type="text/css" /> --> <title>Annotated XHTML Example</title> </head> <body> <p>An XHTML JSP Example</p> <% out.println("<p>My name is Michael</p>"); %> </body> </html> Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.
  • 28. The End Michael Wakahe michael@tawi.mobi +254 (0)20 250 9260 www.tawi.mobi Copyright © Tawi Commercial Services Ltd. 2015. All Rights Reserved.