<s>
In	O
web	O
page	O
design	O
,	O
and	O
generally	O
for	O
all	O
markup	O
languages	O
such	O
as	O
SGML	B-Language
,	O
HTML	B-Language
,	O
and	O
XML	B-Protocol
,	O
a	O
well-formed	B-General_Concept
element	I-General_Concept
is	O
one	O
that	O
is	O
either	O
a	O
)	O
opened	O
and	O
subsequently	O
closed	O
,	O
or	O
b	O
)	O
an	O
empty	O
element	O
,	O
which	O
in	O
that	O
case	O
must	O
be	O
terminated	O
;	O
and	O
in	O
either	O
case	O
which	O
is	O
properly	O
nested	B-General_Concept
so	O
that	O
it	O
does	O
not	O
overlap	O
with	O
other	O
elements	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
HTML	B-Language
:	O
<b>word</b>	O
is	O
a	O
well-formed	B-General_Concept
element	I-General_Concept
,	O
while	O
is	O
not	O
,	O
since	O
the	O
bold	O
element	O
is	O
not	O
closed	O
.	O
</s>
<s>
In	O
XHTML	B-Language
,	O
and	O
XML	B-Protocol
,	O
empty	O
elements	O
(	O
elements	O
that	O
inherently	O
have	O
no	O
content	O
)	O
are	O
terminated	O
by	O
putting	O
a	O
slash	O
at	O
the	O
end	O
of	O
the	O
"	O
opening	O
"	O
(	O
only	O
)	O
tag	O
,	O
e.g.	O
</s>
<s>
In	O
HTML	B-Language
4.01	I-Language
and	O
earlier	O
,	O
no	O
slash	O
is	O
added	O
to	O
terminate	O
the	O
element	O
.	O
</s>
<s>
HTML5	B-Application
does	O
not	O
require	O
one	O
,	O
but	O
it	O
is	O
often	O
added	O
for	O
compatibility	O
with	O
XHTML	B-Language
and	O
XML	B-Protocol
processing	O
.	O
</s>
<s>
In	O
a	O
well-formed	B-Language
document	I-Language
,	O
</s>
<s>
a	O
single	O
element	O
,	O
known	O
as	O
the	O
root	B-Language
element	I-Language
,	O
contains	O
all	O
of	O
the	O
other	O
elements	O
in	O
the	O
document	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
code	O
below	O
is	O
not	O
well-formed	B-General_Concept
HTML	I-General_Concept
,	O
because	O
the	O
em	O
and	O
strong	O
elements	O
overlap	O
:	O
</s>
<s>
In	O
XML	B-Protocol
,	O
the	O
phrase	O
well-formed	B-Language
document	I-Language
is	O
often	O
used	O
to	O
describe	O
a	O
text	O
that	O
follows	O
all	O
the	O
syntactic	O
rules	O
as	O
well-formedness	O
rules	O
in	O
the	O
XML	B-Protocol
specification	I-Protocol
:	O
strictly	O
speaking	O
the	O
phrase	O
is	O
tautological	O
,	O
since	O
a	O
text	O
that	O
does	O
not	O
follow	O
these	O
rules	O
is	O
not	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
The	O
rules	O
for	O
well-formed	B-Language
XML	I-Language
documents	I-Language
go	O
beyond	O
the	O
general	O
requirements	O
for	O
the	O
markup	O
languages	O
mentioned	O
above	O
.	O
</s>
<s>
The	O
additional	O
rules	O
include	O
,	O
for	O
example	O
,	O
a	O
rule	O
to	O
quote	O
attribute	O
values	O
,	O
case-sensitiveness	O
of	O
tag	O
names	O
,	O
rules	O
about	O
the	O
characters	O
that	O
can	O
appear	O
in	O
names	O
and	O
elsewhere	O
,	O
the	O
syntax	O
of	O
comments	O
,	O
processing	B-Language
instructions	I-Language
,	O
entity	O
references	O
,	O
and	O
CDATA	O
sections	O
,	O
and	O
many	O
other	O
similar	O
details	O
.	O
</s>
<s>
Sometimes	O
the	O
adjective	O
well-formed	O
is	O
used	O
to	O
contrast	O
with	O
valid	O
:	O
a	O
valid	B-Protocol
XML	I-Protocol
document	I-Protocol
is	O
one	O
that	O
is	O
not	O
only	O
well-formed	O
,	O
but	O
also	O
conforms	O
to	O
the	O
grammar	O
defined	O
in	O
its	O
own	O
DTD	O
(	O
Document	B-Language
Type	I-Language
Definition	I-Language
)	O
.	O
</s>
