name
attribute for the elements a
, applet
, frame
, iframe
, img
, and map
.
Wrong | Correct |
---|---|
<img src="picture.gif" name="picture1" /> |
<img src="picture.gif" id="picture1" /> |
name
and id
, with identical attribute values.
To make your XHTML compatible with today’s browsers, you should add an extra space before the ‘/’ symbol.
<img src="picture.gif" id="picture1" name="picture1" /> |
lang
attribute applies to almost every XHTML element.
It specifies the language of the content within an element.
If you use the lang
attribute in an element, you must add the xml:lang
attribute, like this:
<div lang="no" xml:lang="no">Heia Norge!</div> |
html
, head
, and body
elements must be present, and the title
must be present inside the head
element.
The xmlns attribute in <html> , specifies the xml namespace for a document, and is required in XHTML.
|
|