Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    XML Syntax

    XML Tutorials


    The XML syntax is a set of rules that defines the combinations of symbols considered to be a correctly structured XML document or fragment. This lesson describes how to write XML syntax.

    XML Example:
    <?xml version="1.0" encoding="UTF-8" ?>
    <address>
      <name>Alex</name>
      <company>w3schools</company>
      <phone>(091) 123-4567</phone>
    </address>

    In the above example, employee information is stored in XML.

    XML Tag

    Syntax:

    <name>Alex</name>
    • XML tags are surrounded by the two characters < and >.
    • The start tag is often called the opening tag, and the end tag is often called the closing tag.
    • All XML elements must have a closing tag.
    • XML tags must be closed in the proper order.
    • XML Tags are Case Sensitive.
    • The text between the start and end tags is the data.

    XML Start Tag

    Syntax:

    <name>

    XML End Tag

    Syntax:

    </name>

    Empty XML Tag

    Syntax:

    <name></name>


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.