Maria: It seems that the browser ignores everything between the angle brackets in-
cluding the brackets themselves.
Professor: Good observation. What the br owser is ac tually ignoring here is an un-
known tag. HTML is a computer lang uage, wh ic h follows a certain well defined set
of rules that we call syntax. Tho se rules come in the form of combinations of different
symbols that define certain comm ands. They tell a computer w hat ne eds to be done.
For example, a left ang le bracket (<) im mediately followed by some text followed
by a right angle bracket (>) is an opening tag—a message to the browser that a new
element has started. The tag itself is not displayed. The browser d oes not display the
tag even if it does not recognize it. An unrecogniz ed tag is silently ignored.
Let’s go back to our example. The problem is not that the tag isn’t reco gnized by
the browser, since we didn’t use any tag in the first pla ce. T he less-than sign has a
special meaning for the browser, which interprets it as the beginn ing of an opening tag
rather than displaying it. A character that has a special (reserved) meaning is called
a reserved character. To be able to display reser ved characters, HT ML has defined
additional syntax rules called character e ntities. Character entities are not limited
only to the re served characters, thou gh. They can be used to display any character.
For example, a character that is not present on your keyboard.
The syntax for a characte r entity is an ampersand (&) followed by an entity name
followed by a semicolon (;):
&entity_name ;
All browsers should support at least th ese five cha racter entities:
Display Chara cter Entity Name Description
< lt less than
> gt greater than
& amp ampersand
" quot quotation mark
’ apos apostrophe
Note that the en tity names are case sensitive. There are of course tons of other char-
acter entities. If you are interested in experimenting with them, I encourage you to
search tables of ch aracter entities on the Web.
Now we are ab le to rewrite our last example:
The notation x<y means that x is less than
y, while x>y means that x is greater than y.
Instead of entity names, you can also use entity num bers, to wh ic h you should prepend
an additional hash (#) character. Using an entity number, a character entity can be
expressed in the form:
32 Meeting 2. Building a Sound Structure