About this site's lack of design: Yes, it's supposed to look this way — I'm using a sandbox theme for WordPress (see it on GitHub).

Dan Rubin's SuperfluousBanter

Design, random musings, and the Web. Since 1977


Syntax, Semantics and Pragmatics in Hypertext Documents

What are we talking about? Semantics is a topic that has been much discussed
last year and still remains an important issue (although it’s becoming
somewhat of a buzzword. Hype or reality?). This post is not aimed at discussing
the value or importance of semantics as such, but rather its general framework
and its application to hypertext documents and web sites in general.


Semiotics is commonly known as the general science of signs. Semiotics is composed
of three aspects: a syntactical aspect (syntax or syntactics), a semantic aspect
(semantics) and a pragmatic aspect (pragmatics).

Syntactics (Syntax)

Different forms of data exchange are constituted of signs or combination of
signs (language, code, non-verbal signs — among others). Syntax defines
a set of rules to be applied when exhanging data, thus “the relationship
of signs to what they stand for”. Breaking these rules results in a syntactical
disturbance. An example of this type of disturbance in human data processing
are spelling errors.

For example, using an element spelled <stronk> instead of
<strong>. But also ommiting a closing tag on empty elements
such as <img>. The related DTD
(Document Type Definition) or more recently a Schema
contains the rules that define the correct spelling or application of (the signs
that constitute) an element (note: in XML the number of elements are unlimited).


Semantics applies to the meaning of data. When exchanging data sender and receiver
will have to assign the same meaning to particular (combinations of) signs,
thus “the relation of signs to the objects to which the signs are applicable”.
If this condition is not respected a semantic disturbance will occur. An example
of the above mentioned disturbance is a discussion between two individuals not
being able to understand each other.

The meaning (or context) of specific elements is what we commonly refer to
as the semantic value of code. Therefor the use of <p> elements
is justified in the context of a paragraph and likewise <hn>
n{1,6} elements are used to represent headers in a document. Furthermore elements
have to be nested correctly. For example — in a (X)HTML document —
an <h1> element can not contain a paragraph. The DTD or Schema
explicitely contains nesting rules. However it can not evaluate if the context
of a particular element is semantically correct. Current validators check a
document for syntactical errors, but remain limited in their aptitude to discern
issues related to semantics. The question remains if it’s technically
possible to build an analysis tool spitting out suggestions regarding the semantic
value of a document. Dan Cederholm started
a practical initiative known as SimpleQuiz
— discussing the semantic value of elements in hypertext documents.


This aspect describes the effect a particular signal has on the behaviour
of the receiver, thus the “relation of signs to (human) interpreters”.
If the effect is different from the senders initial intention a pragmatic disturbance
occurs. A suitable example are speed delimiter signs found on most roads, with
various applicable values. No spelling errors have been made and the data is
correctly interpreted by both sender and receiver — yet some drivers ignore
this signal by speeding.

Pragmatics relate to some extend to usability. How will a user (receiver) act
or react to a given condition, situation or signal (sender). It’s become
best practice to avoid underlining regular text in documents (emphasis), and
reserve this practice exclusively for hyperlinks. Abstracting from context,
syntax nor semantics forbid the above mentioned practice. However, underlining
text that is not a hyperlink (or ommiting to underline a hyperlink) results
in a pragmatic disturbance — users expect a hyperlink to be underlined
(and vice versa).


This item was posted by dhilhorst on Wednesday, January 28th, 2004.


You can follow comments on this item via the RSS 2.0 feed.

Comments are closed.

4 comments on “Syntax, Semantics and Pragmatics in Hypertext Documents”

  1. Posted by David House on Wednesday, January 28th, 2004.

    Just a quick one: Semiotics is also Semiology.

  2. Posted by Didier Hilhorst on Wednesday, January 28th, 2004.

    David — You are absolutely right. Both terms are used to describe the science of signs and are considered interchangeable. Thanks for pointing this out.

  3. Posted by Scrivs on Thursday, January 29th, 2004.

    So then is today’s lesson semantics are important and should be followed?

  4. Posted by Didier Hilhorst on Thursday, January 29th, 2004.

    Scrivs — That remains of course to be seen. As I mentioned in my first paragraph this post is “[…] not aimed at discussing the value or importance of semantics as such […]”. However, it’s undoubtedly an interesting question which is hard to answer in a few sentences.

    Furthermore if web developers talk about semantics it’s usually confined to the world of hypertext. Making semantics work in hypertext documents isn’t rocket surgery. However the bigger picture of semantics is extensive and ill-defined.

    I think there’s nothing wrong with keeping semantics in mind when developing web sites. In practice the positive effects by far outweight possible negative effects (if any). But I’m interested in your take on the matter.