Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
Wipro Work Experience as Software Engineer
Next article icon

WML | Introduction

Last Updated : 02 Mar, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

WML stands for Wireless Markup Language (WML) which is based on HTML and HDML. It is specified as an XML document type. It is a markup language used to develop websites for mobile phones. While designing with WML, constraints of wireless devices such as small display screens, limited memory, low bandwidth of transmission and small resources have to be considered. WAP (Wireless Application Protocol) sites are different from normal HTML sites in the fact that they are monochromatic (only black and white), concise and has very small screen space, due to which content in the WAP sites will be only the significant matter, much like how telegraph used to work in the olden days. The concept WML follows is that of a deck and card metaphor. A WML document is thought of as made up of many cards. Just like how cards can be grouped to form a deck, a WAP site has many cards. One card will be displayed at a time on the screen, just like how one page is displayed at a time in an HTML website. Many cards can be inserted into a WML document, and the WML deck is identified by a URL. To access the deck, the user can navigate using the WML browser, which fetches the deck as required.

Features of WML:

  • Text and Images: WML gives a clue about how the text and images can be presented to the user. The final presentation depends upon the user. Pictures need to be in WBMP format and will be monochrome.
  • User Interaction: WML supports different elements for input like password entry, option selector and text entry control. The user is free to choose inputs such as keys or voice.
  • Navigation: WML offers hyperlink navigation and browsing history.
  • Context Management: The state can be shared across different decks and can also be saved between different decks.

Problems Faced by a Web Application When Used With a Mobile and Wireless Environment:

1. HTTP:

  • Bandwidth and delay: HTTP is not made for low bandwidth and high delay connections in mind. HTTP protocol headers are large and redundant as HTTP is uncompressed and stateless.
  • Caching: Caching is disabled by content providers as client companies cannot get feedback if a cache is placed between a server and a client. Users suffer from downloading the same content repeatedly from the server as HTTP is stateless.
  • Posting: Sending some content from a client to a server will create additional problems if the said client is disconnected at that moment.

2. HTML: HTML was designed for use in creating content for webpages of the World Wide Web (www). It was meant only for desktop initially. Thus, when used in hand-held devices, some problems arise:

  • Small display and low-resolution.
  • Limited User Interfaces.
  • Low-Performance CPU.

Enhancements needed for use of HTML in wireless environments:

  • Image scaling
  • Content Transformation: Documents in PDF or PPS should be transformed into the plain text as PDF occupies more memory.
  • Content Extraction: To avoid longer duration waits, some content like headlines can be extracted from the document and presented to the user. This lets the user decide which information alone needs to be downloaded.

Enhancements needed for use of HTTP in wireless environments:

  • Connection Re-use: Client and server can be used the same TCP (Transmission Control Protocol) connection for several requests and responses. Pipelining can be used to improve performance.
  • Caching Enhancements: A cache could store cacheable response to reduce response time and bandwidth for further responses. Caching can be done in the mobile client’s web browser itself by using a client proxy. A network proxy can also be used on the network side.
  • Bandwidth Optimization: HTTP supports compression and also negotiates the compression parameters and compression styles. This will allow partial transmissions.

WMLScript: WMLScript is the client-side scripting language of WML in Wireless Application Protocol(WAP) and whose content is static. It is similar to JavaScript. It is optimized for low power devices and is a compiled language. Some of the standard libraries of WMLScript are Lang, Float, String, URL, WML Browser, Dialog, and WMLScript Crypto Library.

Declaring A WML Document and Cards: To create a WML document, type it in notepad, just like for HTML. The first line should be something like this:




<?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC 
"-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
        <card id="index" 
              title="My WAP Site Using WML" 
              newcontext="true">
        </card>
    </wml>
 
 

Which tells the phone that it is going to interpret a WML document and the WML standards. A card with the ID contents (used for linking) will be generated and the output at the top of the screen will be. It is extremely important to close all WML tags, unlike HTML tags. If you do not close a WML tag, a card will not open at all. You have to close both the <card> and <wml> tags.

Example: The code below shows a sample WML coding for a small WAP site with two cards and a link to an external website.




<?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
  
    <wml>
        
        <!-- This is first card-->
        <card id="one" title="First Card">
            <h1> Geeksforgeeks </h1>
            <p>
                A Computer Science Portal for Geeks
            </p>
        </card>
         
        <!-- This is second card-->
        <card id="two" title="Second Card">
            <p>
                This is created by WML
            </p>
        </card>
  
    </wml>
 
 

Output:

Comparison of WML with HTML:

  • WML is used only for WAP sites on mobile phones and can be hosted only be WAP hosts that support WML. HTML can be hosted by any web server.
  • WML sites are monochrome, unlike HTML sites.
  • Coding is similar in many aspects but a badly coded WAP site will definitely not run as compared to a badly coded HTML site.
  • It is must to close all WML tags as compared to the more lenient HTML coding.
  • There are no alignment tags like the <center> tag in WML, as in HTML. Instead, <p align=”center”> has to be used for aligning text in WML.
  • There are problems when using old HTML tags like <br> which have no closing tag. To get around this in WML, some tags have a “/” put on the end like <br />.
  • Only WBMP format monochrome images are supported in WML whereas there is no such restriction in HTML.


Next Article
Wipro Work Experience as Software Engineer

M

mary4robson
Improve
Article Tags :
  • HTML
  • Web Technologies
  • HTML-Misc
  • WML

Similar Reads

  • Ben Shneiderman eight golden rules of interface design (Human Computer Interaction)
    Eight Golden Rules Of Interface Design: This section covers eight golden rules that are applicable in most interactive systems. These principles are derived from experience and refined over two decades. These rules are well-received as a useful guide to students and designers. 1. Strive For Consiste
    5 min read
  • IIST Admission Experience
    I had always dreamed of pursuing a course that would fuel my passion for technology while allowing me to make a positive impact on society. After careful consideration, I set my sights on the Bachelor's program in Computer Science at the esteemed IIST, renowned for its cutting-edge curriculum and nu
    2 min read
  • Free GRE Analytical Writing Practice Online Test- GRE Analytical Writing Section Test-6
    Free GRE Analytical Writing Online Test 2024 is vital for your preparation across verbal, quantitative, and analytical writing sections. Regularly completing online free GRE Analytical Writing Online Tests enhances your understanding of various question types and improves performance evaluation. The
    6 min read
  • Wipro Work Experience as Software Engineer
    I had the opportunity to work at an esteemed IT company based in Bangalore, renowned for its excellent work environment, competitive compensation package, and renowned status in the industry. As a Software Engineer, I contributed to the development and maintenance of various software projects, gaini
    2 min read
  • Nxt Wave Interview Experience for MERN Stack Jan 2024
    - Self Introduction - Project Explanation - Strength and Weakness HTML/CSSWhat is the use of HTMLDifference between HTML & HTTPAnchor TagOrdered List and Unordered ListCenter the button without using divDesign a Basic Login formMedia QueriesDifference between HTML4 & HTML5SQLWhat is data
    1 min read
  • Wipro Interview Experience | On-Campus
    Wipro came in our college on 10th September 2019. The written test was easy (be careful with essay part). After clearing written, technical and HR happened. 1) What is primary key? 2) Why is alternate key? 3) What is mapping cardinality? 4) Example of many to many mapping 4) How to implement one to
    1 min read
  • Kallam Harandhareddy Institute of technology Fest Experience (Samkalp) 2023
    Mind-bogglingly College Fest Experience:The yearly school fest at our foundation is without a doubt one of the most expected occasions of the year. It's the point at which the whole ground wakes up with a mind-boggling energy and excitement that is difficult to depict. In this account, I might want
    6 min read
  • Wipro NLTH Interview Experience
    Before the interview, it is mandatory to clear their test which consists of Logical reasoning, verbal, analytical, technical MCQs questions followed by a coding round with two questions and essay writing Coding questions asked were: k'th largest element in arraya simple if else based question Interv
    1 min read
  • GRE Exam Full-Length Practice Test 2024: Download GRE Free Test-10
    GRE Exam Full-Length Practice Test 2024 is vital for your preparation across verbal, quantitative, and analytical writing sections. Regularly completing the online Free GRE Exam Full-Length Practice Test 2024 enhances your understanding of various question types and improves performance evaluation.
    12 min read
  • GRE Analytical Writing Free Mock Test: Analytical Writing Section Test-10
    GRE Analytical Writing Mock Test 2024 is vital for your preparation across verbal, quantitative, and analytical writing sections. Regularly completing online GRE Analytical Writing Mock Tests enhances your understanding of various question types and improves performance evaluation. The official ETS
    7 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences