What is flexible markup?

Flexible markup works in different contexts; its display is easy to change; it expands to contain new information. Flexible markup turns on a dime.

It's important to write flexible markup because you can't always know how your information will be accessed, or what needs all your users have. You cannot know how the archive will be developed or what the interface will contain. Make everything you write easy for other people to use and modify. Be open.

We Are Anonymous

Semantic markup is the process of naming data, of giving meaning to undifferentiated text. Browsers can't recognise text unless it is described by html tags, so we call everything that is not a tag anonymous.

<p>This sentence is anonymous inline content, but we know this is a paragraph because it's marked as one with html.</p>

Hooks

Semantic (meaningful) markup is flexible. It's consistent and easy to understand, but there is another practical benefit: semantic markup has lots of hooks.

Compare these two ways of writing a series of links:

  1. 
    <p><a href="..">link one</a> | <a href="..">link two</a> | <a href="..">link three</a></p>
  2. 
    <ul class="navigation">
    	<li><a href="..">link one</a></li>
    	<li><a href="..">link two</a></li>
    	<li><a href="..">link three</a></li>
    </ul>

Remembering what you know about anonymous, inline, and block elements, look again:

  1. <p><a href="..">link one</a> | <a href="..">link two</a> | <a href="..">link three</a></p>
  2. <ul class="navigation">
    • <li> <a href="..">link one</a> </li>
    • <li> <a href="..">link two</a> </li>
    • <li> <a href="..">link three</a> </li>
    • </ul>

In the second structure, every bit of data is named and tagged. A tag is a box. Boxes can be manipulated. Anonymous inline content cannot be selected easily. Ease is a priority.

Even though it might look more complicated, because there are more tags, the second structure is more flexible, accessible, and semantic. In the future, it will be easier to change around, and it's possible for external actors, like user agents and third party applications, to see and use the data.

Comments are everything

tba

Reduce, Reuse, Recycle

← Back