ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Web Design and Development
    CSI-501
    Progress0 / 22 topics
    Topics
    1. World Wide Web Architectures, Protocols, and Standards2. HTTP Protocol3. HTML4. xHTML5. CGI6. XML7. WML8. cHTML9. Web Technologies and Tools for Web Application Development and Deployment10. Scripting Tools11. Web Servers12. Application Servers13. Web Based Applications14. Search Engines15. Content Management Systems16. Management of Large Scale Web-Based Information Systems17. Web Services18. Web219. Semantic Web20. Web321. Principles of Website Design22. Practical Exercise in Website Development
    CSI-501›WML
    Web Design and DevelopmentTopic 7 of 22

    WML

    8 minread
    1,328words
    Intermediatelevel

    WML (Wireless Markup Language)

    WML (Wireless Markup Language) is a markup language used to create web content specifically for mobile devices, especially before the widespread adoption of smartphones with modern mobile browsers. WML was designed for the WAP (Wireless Application Protocol) environment, which was an early standard for delivering internet content to mobile phones.

    WML is a part of the WAP protocol suite and is structured similarly to HTML but with optimizations for mobile devices, which typically had limited screen size, slower processors, and slower data connections compared to desktop environments.


    1. What is WML?

    WML is a text-based markup language used to create content that can be displayed on mobile phones and other wireless devices. It was specifically created to work with the WAP protocol, which allowed mobile devices to connect to the internet, access websites, and interact with web content over wireless networks.

    WML is XML-based, which means it follows similar principles to XML and HTML but has been tailored to fit the constraints of early mobile technology.


    2. Structure of a WML Document

    A WML document follows a strict structure to ensure compatibility with mobile devices. The structure is based on a deck and cards model, which are designed to fit the mobile environment's limited screen size.

    • Deck: The entire WML document is called a "deck". A deck contains one or more "cards".

    • Card: A card is a single screen of content. Each card contains one or more elements (like text, links, images, or forms) that are displayed to the user on the mobile screen.

    Basic WML Document Structure:

    <?xml version="1.0" encoding="UTF-8" ?>
    <wml>
      <card id="home">
        <p>Welcome to WML</p>
        <do type="accept" label="Next Card">
          <go href="#next"></go>
        </do>
      </card>
    
      <card id="next">
        <p>This is the next card</p>
      </card>
    </wml>
    
    • Prolog: Like XML, WML files begin with a declaration, typically <?xml version="1.0" encoding="UTF-8"?>, which specifies the version and character encoding of the document.

    • Root Element: The root element of the document is <wml>, which encloses all the content.

    • Card Element: Each card is enclosed within the <card> tag, and each card can contain multiple elements like <p> (paragraph), <do> (actions), and other components.

    • Action (do): The <do> element defines an action, such as navigating to another card when the user presses a button or link.


    3. Key Components of WML

    • Deck: A collection of cards that represent a series of screens. The deck is the outermost container in a WML document.

    • Card: A single "page" or screen of content displayed to the user. A card can contain text, images, forms, and interactive elements.

    • Action Elements (do): Actions are interactive components that trigger specific events, such as navigating to another card, submitting a form, or executing a script. The <do> element defines the type of interaction (such as accept or prev) and the action to take.

    • Text (p, br, etc.): WML supports a subset of HTML tags for displaying text. For example:

      • <p> is used for a paragraph.
      • <br> is used for line breaks.
      • <b> is used for bold text, and <i> for italics.
    • Linking (go, postfield, etc.): Links in WML are created using the <go> tag, which defines navigation between cards or external links. The <postfield> tag is used to send data as part of a request (similar to HTML forms).

    • Forms and Input: WML supports forms for user input using elements like <input>, <select>, and <postfield>. Forms allow users to submit data, and the postfield element sends the data to a server or another part of the deck.


    4. WML Elements Overview

    • <wml>: The root element that wraps the entire document.

    • <card>: Defines a single page or screen in a WML deck. Each card can have a unique id.

    • <do>: Specifies an action to be taken, such as navigating between cards or performing a submit action. The type attribute indicates the type of interaction, like "accept", "prev", "back", or "next".

    • <go>: Used inside the <do> element to specify a link or destination for a card. It can link to another card or an external resource.

    • <p>: Represents a paragraph of text.

    • <input>: Allows for user input within a form. It can take different types of input, such as text fields or checkboxes.

    • <select>: Defines a dropdown list from which the user can select an option.

    • <postfield>: Specifies data that needs to be sent when submitting a form (similar to HTML form elements).

    • <br>: Defines a line break.


    5. WML Example: A Simple WML Deck

    Here’s a simple WML document example that demonstrates the basic structure and elements:

    <?xml version="1.0" encoding="UTF-8" ?>
    <wml>
      <!-- First Card -->
      <card id="home">
        <p>Welcome to the WML site!</p>
        <do type="accept" label="Next">
          <go href="#next"></go>
        </do>
      </card>
    
      <!-- Second Card -->
      <card id="next">
        <p>This is the next screen.</p>
        <do type="accept" label="Go Back">
          <go href="#home"></go>
        </do>
      </card>
    </wml>
    

    In this example:

    • The document starts with a <wml> root tag.
    • The first <card> contains a greeting and a link (using <do> and <go>) to the second card.
    • The second card has a simple message and a button that navigates back to the first card.

    6. Advantages of WML

    • Mobile-Friendly: WML was specifically designed to work on mobile phones with small screens, limited processing power, and slow internet connections.

    • Low-Bandwidth Optimization: WML's minimalistic design helped optimize the use of low-bandwidth connections, which was crucial for early mobile internet access.

    • Compatibility with WAP: WML worked seamlessly with WAP-enabled devices and provided mobile users with access to basic internet services like checking the weather, reading news, or sending simple requests.


    7. Disadvantages of WML

    • Limited Functionality: Compared to modern web technologies, WML was quite limited in terms of interactivity, multimedia support, and user experience. It lacked the advanced features and rich UI elements that current mobile web technologies offer.

    • Obsolescence: With the advent of smartphones and mobile browsers (which support HTML, CSS, and JavaScript), WML became obsolete. WAP and WML were replaced by modern mobile web standards, such as HTML5, which provide much more advanced capabilities.


    8. WML and the Evolution of Mobile Web

    WML was crucial in the early days of mobile internet access but has largely been replaced by newer, more robust technologies. Here's how mobile web development has evolved:

    • WAP and WML: In the late 1990s and early 2000s, WAP and WML were standard for mobile internet. WML allowed mobile users to access basic websites and services on feature phones with limited capabilities.

    • HTML5 and Modern Mobile Browsers: With the development of smartphones, the mobile web shifted to using HTML5, CSS3, and JavaScript, which provide a richer, more interactive user experience. Mobile browsers now support the same web technologies as desktop browsers, allowing developers to create feature-rich, responsive websites for all devices.


    9. Conclusion

    WML (Wireless Markup Language) played an important role in the early days of mobile web development. It allowed mobile phones with limited processing power and small screens to access simple web content over slow wireless networks. However, with the evolution of mobile technology, WML has been replaced by more powerful and flexible standards like HTML5. Understanding WML provides historical context for the development of mobile web technologies and helps highlight the progress made in mobile internet access.

    Previous topic 6
    XML
    Next topic 8
    cHTML

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time8 min
      Word count1,328
      Code examples0
      DifficultyIntermediate