The first version of XHTML 1.0, was released in 2000
W3C description of XHTML :
XHTML 1.0 reformulates HTML as an XML application. This makes it easier to process and easier to maintain. XHTML 1.0 borrows elements and attributes from W3C's earlier work on HTML 4, and can be interpreted by existing browsers, by following a few simple guidelines. This allows you to start using XHTML now!
XHTML is extensible meaning that its element set is not finite, like that of HTML. Additional elements or other XML-based languages can be integrated with XHTML
XHTML consists of the element set of HTML reformulated to adhere to the syntax rules of XML
XHTML is compatible with existing web browser technology and will be compatible with future XML-based clients
This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.0 Strict
This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML 1.0 Frameset
This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
This element encompasses the content of the document
Style attributes available with XHTML Transitional and Frameset:
bgcolor – sets the background color for the document
text – sets the color for text in the document
link – sets the color for hyperlinks
vlink – sets the color for hyperlinks that have been clicked on
alink – sets the color for active hyperlink
NOTE: Formatting attributes not included in the XHTML Strict 1.0 specification and will not be included in future versions of XHTML. The formatting styles provided by these attributes are being replaced by style sheet properties.
The GIF format supports 256 colors and is a good format for small non-photographic images like icons and buttons
JPEG - Joint Photographic Experts Group
JPEG is a compression technique that is used to reduce large file sizes for high quality images, like photographs
PNG - Portable Network Graphics
PNG was originally developed to replace the GIF format. The biggest difference between PNG and GIF is that PNG supports more than 256 colors
The next slide will demonstrate the differences in image quality and file sizes for these 3 formats. Notice that the GIF file is much more grainy than the JPEG and PNG files. This is due to the restriction to only 256 colors.
JPEG Format Stage.jpg File size – 28k GIF Format Stage.gif File size – 13k PNG Format Stage.png File size –164k Original file – Windows Bitmap file – Stage.bmp File Size – 351k
Web forms give Website owners the ability to receive information from their users or to allow users to personalize the Website
A Web form can contain many types of input elements:
Form input values are processed by a program on the Web server and usually send another XHTML page back to the Web browser with either a set of results based on the user’s input, or a confirmation page
Forms can be located anywhere in the body of an XHTML document
Once a user has completed the form, the data must be sent to the server to be processed
The XHTML language provides a means to submit the form using the program that is specified in the action attribute of the <form> element by assigning the value of “submit” to the type attribute for the <input /> element:
<input type=”submit” />
XHTML also gives users an ability to clear the form and reset the default values by assigning the value of “reset” to the type attribute for the <input /> element:
<input type=”reset” />
The value attribute can be set to assign names to either of these buttons. If no value is set, then the computer will assign default text
Open <form> element } Checkbox group for accounts } Radio group for emp close <form> element } Select group for branch submit button
In this section you learnt how to add the following elements to a web page
We didn’t cover any formatting like different fonts or colours or alignment or removing borders. This is because most of those attributes and tags are deprecated and formatting is primarily done using cascading style sheets (CSS) – this is covered in the next section.