SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question mark in tags

    Hello. Why some languages use question mark in their tag names such as in Xml (<?xml version="1.0" ?>) and in php (<?php echo "hello" ?>) ? Does the question mark have a meaning in tags?

    Thanks in advance.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is known in SGML as a Processing Instruction, or PI. HTML is an application of SGML, while XML is a subset of SGML. XHTML is an application of XML.

    A PI doesn't mark up content like a normal tag. It is used for specifying instructions to the user agent's parser.

    You also have directives, which in SGML are surrounded by <!...>. The doctype declaration is an example. Directives can also contain comments, surrounded by pairs of double hyphens. So if you want a comment in HTML or XML you can write <!--comment-->. Another example is CDATA sections, marked up with <![CDATA[...]]>.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much @AutisticCuckoo. Really benefited your answer.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •