Differences between Strict XHTML and Transitional XHTML
November 7, 2007 · Posted in general web · Comment
Following attributes were removed from the Strict XHTML:
- Attribute alink is forbidden on body.
- Attribute background is forbidden on body.
- Attribute bgcolor is forbidden on body, table, td, th, tr.
- Attribute border is forbidden on img, object, it can be used on table.
- Attribute clear is forbidden on br.
- Attribute language is forbidden on script.
- Attribute link is forbidden on body.
- Attribute name is forbidden on form, img, it can be used on a, button, input, map, meta, object, param, select, textarea.
- Attribute noshade is forbidden on hr.
- Attribute nowrap is forbidden on td, th.
- Attribute start is forbidden on ol.
- Attribute target is forbidden on a, area, base, form, link.
- Attribute text is forbidden on body.
- Attribute type is forbidden on li, ol, ul. It can be used on a button, input, link, object, param, script, style.
- Attribute value is forbidden on li. It can be used on button, input, option, param.
- Attribute vlink is forbidden on body.
Following elements cannot occur in the given context in the Strict XHTML:
- #PCDATA cannot be a child of blockquote, body, form, noscript.
- Element a cannot be a child of blockquote, body, form, noscript.
- Element abbr cannot be a child of blockquote, body, form, noscript.
- Element acronym cannot be a child of blockquote, body, form, noscript.
- Element b cannot be a child of blockquote, body, form, noscript.
- Element bdo cannot be a child of blockquote, body, form, noscript.
- Element big cannot be a child of blockquote, body, form, noscript.
- Element br cannot be a child of blockquote, body, form, noscript.
- Element button cannot be a child of blockquote, body, form, noscript.
- Element cite cannot be a child of blockquote, body, form, noscript.
- Element code cannot be a child of blockquote, body, form, noscript.
- Element dfn cannot be a child of blockquote, body, form, noscript.
- Element em cannot be a child of blockquote, body, form, noscript.
- Element i cannot be a child of blockquote, body, form, noscript.
- Element img cannot be a child of blockquote, body, form, noscript.
- Element input cannot be a child of blockquote, body, form, noscript.
- Element kbd cannot be a child of blockquote, body, form, noscript.
- Element label cannot be a child of blockquote, body, form, noscript.
- Element map cannot be a child of blockquote, body, form, noscript.
- Element object cannot be a child of blockquote, body, form, noscript.
- Element q cannot be a child of blockquote, body, form, noscript.
- Element samp cannot be a child of blockquote, body, form, noscript.
- Element select cannot be a child of blockquote, body, form, noscript.
- Element small cannot be a child of blockquote, body, form, noscript.
- Element span cannot be a child of blockquote, body, form, noscript.
- Element strong cannot be a child of blockquote, body, form, noscript.
- Element sub cannot be a child of blockquote, body, form, noscript.
- Element sup cannot be a child of blockquote, body, form, noscript.
- Element textarea cannot be a child of blockquote, body, form, noscript.
- Element tt cannot be a child of blockquote, body, form, noscript.
- Element var cannot be a child of blockquote, body, form, noscript.
Rules of converting HTML to XHTML-Transitional
November 6, 2007 · Posted in general web · Comment
Converting from traditional HTML to XHTML 1.0 Transitional is easy, as long as you work carefully and observe the following rules:
1. Open with the proper DOCTYPE & Namespace
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd “>
2. Write all tags in lowercase
<title>XHTML Rules</title>
3. Quote all attribute values
src=”xyz.png” and not src=xyz.png
4. Close all tags
<p>Some Text</p>
5. Close “empty” tags, too
<img src=”xyz.png” />
