WML (Wireless Markup Language) is a lightweight markup language designed specifically for mobile devices, especially early mobile phones with limited processing power, small screens, and slow network connections. It is an XML-based language used to define the content and structure of web pages that can be displayed on mobile devices, primarily for use in WAP (Wireless Application Protocol) applications. WML was a key part of the WAP standard, which was designed to bring internet services to mobile devices long before the modern mobile web (HTML5, JavaScript, etc.) existed.
Optimized for Mobile Devices: WML was designed to accommodate the technical limitations of early mobile devices, including small screens, limited processing power, and slower data transmission speeds compared to desktop internet connections.
XML-Based: WML is based on XML (Extensible Markup Language), which allows it to define elements and structure in a machine-readable way. This also makes WML extensible and adaptable to various mobile device capabilities.
WAP-Compatible: WML was the markup language used for creating content that could be viewed through WAP browsers, which were common on mobile phones in the late 1990s and early 2000s. It allowed users to access basic services such as news, weather, email, and limited e-commerce on mobile phones.
Minimalist and Lightweight: Given the constraints of mobile devices at the time, WML was designed to be extremely lightweight and minimal, with a focus on providing simple text-based content and interactive forms rather than rich multimedia or complex layouts.
Interactivity: WML supports basic interactivity, such as links and forms, which allowed users to navigate between different WML documents (pages) and interact with content on their mobile devices.
WML documents are typically composed of a series of cards (similar to pages in a website), which are grouped together in a deck. A WML deck represents a collection of cards that belong to a particular application or service.
A WML deck contains a sequence of cards. It is analogous to a web page or a sequence of web pages. A deck is usually the top-level container for the content.
<wml>
<card id="card1" title="Welcome">
<p>Welcome to the WML application</p>
</card>
<card id="card2" title="More Info">
<p>Here is some additional information</p>
</card>
</wml>
A card in WML is a container for content, similar to a webpage in HTML. Each card has an ID, a title (usually displayed at the top of the card), and content (usually text, links, or forms). Cards allow users to navigate between different pages within a WML document.
<card id="card1" title="Home">
<p>Welcome to my site</p>
</card>
Some of the important tags used in WML are:
<wml>: The root element that contains all other WML elements.<card>: Defines a page or a screen on the mobile device.<p>: Paragraph tag, used to display simple text.<a>: Anchor tag, used to define hyperlinks for navigation.<do>: A tag used to define user actions, such as a form submission or a navigation link.<input>: Used to create input fields within forms, allowing users to enter data.<select>: Used to create dropdown menus in forms.Here is a basic example of a WML document:
<wml>
<card id="card1" title="Welcome">
<p>Welcome to WML-based mobile web page!</p>
<p><a href="card2">Next</a></p>
</card>
<card id="card2" title="Second Page">
<p>This is the second page of content.</p>
<p><a href="card1">Back</a></p>
</card>
</wml>
<a> tag in WML is used to define navigation between cards within the WML document.Basic Text Display: WML was designed to show simple text content, often with minimal formatting. It supports basic HTML-like tags like paragraphs (<p>), links (<a>), and lists.
Navigation: WML includes basic navigation mechanisms between cards using <a> (anchor tags) for links and <do> for actions like form submissions.
Forms: WML supports basic form functionality through the <input> tag, allowing users to input text or select from predefined options (via <select>). Form data could be submitted to a server for processing.
Event Handling: WML supports actions triggered by user interaction, such as clicking a link or submitting a form. These events are defined within <do> tags.
Minimal Design: WML's layout is minimalistic due to the constraints of mobile devices. It does not support advanced layout or multimedia features that modern web technologies like HTML5 or CSS3 provide.
Here's an example of a simple WML form that allows a user to input data:
<wml>
<card id="card1" title="Enter Your Name">
<p>Please enter your name:</p>
<do type="accept" label="Submit">
<input name="name" type="text"/>
</do>
</card>
</wml>
In this example:
do element is used to trigger the form submission when the user clicks the "Submit" button.WML was a key technology for enabling mobile web access in the early days of mobile internet, allowing users to access text-based content and simple services via mobile phones. However, with the advent of more powerful mobile devices and the widespread adoption of HTML5 and modern mobile web technologies, WML has become obsolete. Today, mobile web development uses standard web technologies (HTML, CSS, JavaScript) that are supported across all devices, providing richer and more dynamic user experiences.
Open this section to load past papers