Attributes

nicerobot edited this page Dec 30, 2014 · 4 revisions

Attributes

Attributes are specified as name value or value name.

e.g.

a href //nicerobot/xupl/wiki/xupl {"xupl"}

and

a //nicerobot/xupl/wiki/xupl href {"xupl"}

and even just

a //nicerobot/xupl/wiki/xupl {"xupl"}

all produce:

<a href="//nicerobot/xupl/wiki/xupl">xupl</a>

Numeric values, including floats, can omit surrounding quotes.

e.g.

size 100 width, height 100

produces:

<size width="100" height="100" />

Or, more generally:

Attribute values are contextualized

Each attribute value is determined automatically whenever possible. Meaning, if it can't be a valid XML attribute name, it will be considered to be the attribute value.

Additionally, leading non-attribute-name characters can dictate the attribute name automatically.

div #name {"nicerobot"}

becomes

<div id="name">nicerobot</div>

div .content {"Xupl"}

becomes

<div class="content">Xupl</div>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.