SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 45 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

It??™s always important to
understand why certain decisions are made, even if they seem to go against the popular trend.
Most importantly, do what works best for you. If there??™s one universal truth when it comes to
web development, it??™s that there??™s never just one way to accomplish something.
HTML vs.XHTML
HTML actually comes in different flavors: HTML and XHTML. XHTML 1.0 is (for the most
part) just an XML-based version of HTML 4.01, the latest HTML standard. Many use and
advocate the use of XHTML because it is the more recent standard available from the W3C.
XHTML certainly has a number of benefits that make it an ideal candidate for web development.
Being an XML format, the document has stricter requirements about how the code
itself is written. For example, all elements must be closed. To close empty elements such as
images, a forward slash is placed just before the closing bracket:
My image
XHTML also requires that tag names be lowercase and that all attributes be quoted.
Browsers that understand XHTML are stricter and tell you when you??™ve written invalid code.
Having these stricter requirements helps you produce valid code.
In XHTML, CSS and JavaScript also offer up some additional changes. In CSS, element
selectors are now case sensitive. Likewise, JavaScript returns element names in lowercase
instead of uppercase, as it does with HTML.


Pages:
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57