XHTML divided into 3
models : transitional, strict, and frameset.
Let's start with
transitional and strict models.
For anyone who wants to
move to XHTML technology, the easier way is to move to XHTML transitional,
that's because XHTML transitional still allows the old tag to be used. If you
used to use HTML instead of XHTML strict, you'll be surprised when
validating your website because of many invalid syntax in your script. XHTML
strict use Cascading style sheet (css) to make a layout and the design.
The first thing we have
to know is we should declare what type of our file. With this declaration, the
browsers, search engines, or website validator will know what document type
they are reading.
Here are the declaration :
- XHTML 1.0 STRICT
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- XHTML 1.0 TRANSITIONAL
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Unused Tags
Several HTML tags will
not be used anymore in HTML Strict. the reason is they can be replaced with
css.
1. <u> for
underline can be replaced by text-decoration :underline in css
2. <Font> can be
replaced by font property in cases which is the richer of style
3. <center> is replaced with text-align property.
The other tags are
replaced : <i> replaced by <em> and <b> for bold replaced by
<strong>.
How about the iframe
tag?
iframe is not used anymore
in XHTML transitional and strict, because it takes a page from the other source
that can contain invalid code, and this will make your page known as invalid
XHTML as well. So if you want to use it, then you have to declare your document
as the XHTML frameset. Here is the declaration :
XHTML 1.0 FRAMESET
<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
Unused Attributes
0 comments:
Post a Comment