XHTML 1 by Carsomyr
What is (X)HTML HTML is an acronym meaning 'HyperText Markup Language' The X means eXtensible, because EHTML isn't as cool (X)HTML is a markup language for formatting documents transmitted over the Entarnets (hypertext)
Internet Protocols XHTML is transmitted over a network using a protocol A protocol is an organized way of transmitting data XHTML is transmitted over HTTP ... HyperText Transmission Protocol, usually over Port 80
History of HTML HTML was based on another language, SGML, which was its predecessor and carried some of the same syntax and ideas as HTML HTML was created by Tim Berners-Lee at CERN was instrumental in creating the World Wide Web that you know and love today HTML was unique from things like Usenet in that it had hyperlinks – inline links which allowed users to jump from page to page and access all kinds of information HTML has been updated and the standard improved upon until HTML 4.01 was developed by the W3C and then switched over completely to the development of XHTML
A quick note on the Browser Wars In ye olden days... Netscape vs. IE Modern Browsers Firefox (Gecko engine) Mozilla Suite Opera Safari IE Konqueror et. al. Chrome
Present and Future of XHTML The latest markup standard is that of XHTML, which is based on a combination of HTML and XML, the eXtensible Markup Language For now, XHTML is the one being updated and maintained. It, in some combination with XML and/or XSLT, will most likely be used for web layout in the future
Basic Syntax Done with the history! The general syntax is: <DOCTYPE ... > <html stuff stuff stuff> <head> <stuff /> </head> <body> <more stuff /> </body> </html>
Basic Syntax con't Essentially, you have everything in a tag, with lowercase Everything must be closed <tag> then </tag> or just <tag />, depending on tag Sequential closing is a must Can't do <tag1> <tag2> aoeu </tag1> </tag2> Must be <tag1> <tag2> content </tag2></tag1>
Not A Programming Language (!) You can't program in XHTML XHTML is used for formatting documents The hallmarks of a programming language (execution, decision, memory, etc.) are missing Scripting languages can be run inside XHTML documents (Javascript, VBscript (yuck) et al.) Server side and CGI programs can be run as well, but not as XHTML
Useful Tags and Practice One of the most useful, yet least remembered is the xml and Doctype declaration. Use this one: <?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Also, the addendums to the html tag may be new: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Actual tags In reality, the ones that you will need to know are those following: <p> - the paragraph tag <br /> - the newline tag <div> - will be used more later <h#> where # is a positive integer, is used for section headers <span> - also to be used later <table> - only to be used for tabular data <img /> - used for images
Example Let's look at an actual part of a page
Real Life Example Have you ever heard of 'page ranking optimization'? Meta tags!
Next Time More advanced layout Starting CSS Practice and logins
Further Reading www.htmlgoodies.com www.w3schools.com www.google.com www.alistapart.com www.w3c.org