Skip to main content

XHTML Tutorial–Lesson 1 Part III

Document Type Definition DTD

As we said in the previous lesson, DTD is mandatory for each XHTML document, and we saw the structure for each XHTML document, that consists of DOCTYPE, html, head, title, body. In other words there is three parts that each XHTML document contain,

  • The DOCTYPE definition.
  • The head section.
  • The body section.

Remember: DOCTYPE definition is the first thing to be written in the XHTML document.

Below an example for an XHTML document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<title>Welcome</title>

</head>

<body>

<h1>Welcome To my page!</h1>

</body>

</html>

Notes

  • As we said before, each XHTML document must start with a DOCTYPE definition, that describes the syntax of a web page, and the allowed syntax to be used, In other words it specifies allowed tags to be used in the XHTML document.

There are three kinds of XHTML DOCTYPE, which are: STRICT, TRANSITIONAL, and FRAMESET. We’ll talk about each kind of them and where to use.

XHTML 1.0 STRICT

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The strict type of XHTML is a really clean markup language of html, it is free of presentational clutter, and used together with CSS. In other words, this type does not support presentational views for the page, and all design aspects and colors, fonts and styles are left to the CSS.

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The transitional type is used if you still need XHTML to support presentational features and don’t want to depend completely on the CSS, it is a mix of XHTML and CSS, in fact this type is the commonly used in the web.

XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

The frameset type is used if you want to use html frames.

It’s important to know that the strict type includes elements and attributes that are not obsolete or have not been deprecated or do not appear in the framesets.

On the other hand, the transitional type includes all elements of the strict type plus obsolete and deprecated elements and attributes. It is not preferable to use obsolete or deprecated elements.

Finally, the frameset includes all features and elements in the transitional type plus frames.

To be continued,

To download this lesson as PDF file click here: XHTML Tutorial–Lesson 1 Part III

Best Wishes,

Anas Jaghoub

Comments

Popular posts from this blog

PHP Tutorial–Guest Book–System Definition and Requirements

In this lesson I’m going to illustrate the system definition and requirements for the Guest Book application. It is an important step in developing any application, since this step gives us an orientation about the system and its functionality, what is expected from the system to do. actually the system definition comes from keywords from customers and end users, usually try to make it clear for what they need in the application, and what they expect the system to do.  As developers it is our role to define the requirements for the system to be developed. In our example the system definition for the Guest Book is: A system that allows visitors of the site to post their comments and feedbacks about the site, with the possibility for managing comments and maintain it easily and user friendly. On the other hand, the system requirements are: a web server, since it is clear that the developed system is going to run on the Internet, so it is a web-based application not windows-bas...

تعلم تطوير تطبيقات للموبايل باستخدام الأندرويد

مرحبا أصدقائي يسعدني أن أبدأ معكم سلسلة حلقات في تعلم تطوير تطبيقات للموبايل باستخدام الأندرويد ، وسأسعى جاهدا معكم في أن تكون هذه السلسلة من أوائل السلسلات في اللغة العربية لتعليم برمجة تطبيقات الأندرويد من البداية وحتى الاحتراف. وسأحاول قدر المستطاع الشرح بلغة عربية بسيطة ومفهومة. حيث ستكون غدا إن شاء الله الحلقة الأولى من تعلم تطوير تطبيقات الموبايل باستخدام الأندرويد. أنس الجاغوب Twitter: @anasjaghoub Facebook: anasjaghoub

AABU GTUG Opening Event

On February 17, 2011 We’ve headed to Al Al Bayt University, to run one of the biggest event established there, for opening the AABU GTUG (Google’s Technologies Users Group). The event focused on introducing the GTUGS (Google’s Technologies Users Groups) and introducing Google’s technologies to students, such as Android and App Engine, to Chrome Extensions and HTML5 demos. Attendees exceeded 250 attendee, in addition to Vice president of Al Al Bayt University Dr. Hashem Al Masaeed, Deanship of College of I.T at Al Al Bayt University Prof. Ismail Ababneh, and a quite number of professors and teachers at the college of I.T at AABU, in addition to Yarmuk fm and Al Ro’aya  tv. AABU GTUG as a Google’s Technologies Users Group interested in Google’s technologies and tries as possible to increase students awareness about Google’s technologies, and introduce it to them. Their was a lot of activities during the event, beginning with the key note from me Anas Jaghoub, that included introducin...