December 27th, 2009
Ok, apparently the book uses XHTML and CSS. I don’t even really understand what is the difference between HTML and XHTM to begin with. That’s just terrific.
*Sigh* Research, research, research. Once again, I must profess my love for Google and Wiki. Don’t tell my college professor.
Let see… XHTML stands for Extensible Hypertext Markup Language
Ah, I like the explanation from w3schools.com:
- XHTML elements must be properly nested
- XHTML elements must always be closed
- XHTML elements must be in lowercase
- XHTML documents must have one root element
That’s all I really need to know, I think. For now anyway. If you don’t know what all the bold words mean, go to the article at http://www.w3schools.com/XHTML/xhtml_html.asp
Very nicely done. Simple, but informative explanation
Hmm. XHTML is not compatible with Internet Explorer. There are ways around it, but I am not a fan of Internet Explorer anyway. They are not particularly user-friendly for Mac. Their last update (for Mac) is in 2003 and later even remove the download. I really dislike websites that require IE to being with. So…
I have too much to deal with for now anyway, so I will let it go. Firefox is great – friendly and work to to satisfy all platform. That’s what customer service is all about!
For now I have finish the structure layout of my main body document and a stylesheet document. (I don’t know what’s a stylesheet yet. But I am sure the book will make me use it later, so I will know, eventually)
Since the documents used XHTML, I had to declare that it is a XHTML documents with a “declaration”. I use the one that comes with KompoZer, which goes like this:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
I also had to go to: ZompoZer –> Perferences –> Advanced, I would then set XHTML 1 for Language (or Markup in some programs) and Transitional for DTD (Strict works, too). Why? Take a look at the declaration above. See the beginning? It says DOCTYPE. The perference setting we just need make sure that the DOCTYPE won’t get overwrite (In another word, appear on the web site or create strange effects)
DOCTYPE stands for Document Type Declaration. It declare the file type: HTML? XHTML? That sort. Different declaration tells the browser (IE, Firefox, Safari, etc) to read your document, your web site, differently.
For XHTML, there is two basic DOCTYPE: Transitional and Strict. Transitional was recommended in the book (I think) because like its name, it is easier for people to transit from HTML to XHTML. It’s less strict in the language that it uses. Strict creates a language that is more uniformally read by all browser, so all different browser -IE, Firefox, Safari, etc – will read your web site the same or similar manner. But, the language is more different from HTML.
I also notice the book, which uses XHTML, is different from the HTML books I had read before by constantly using <div> and <em> tags. It made me confuse for a while, because I only have a vague idea about what em is, and I had never even seen div.
Div, as it turns out, is short for Division. It is use to define a division or section in a document. It can be use in an HTML document, but it is particularly popular in CSS web site for layouting.
Em stands for Emphasized Text, and is also usable in HTML. It is another way to create italic text
The book also uses a lot of <!–//XXXX–>. I later realize that it is for notes. Notes in HTML only shows up on the Source page (Source page is the page you are working on in the editor). It does not show up on the web site you are making. The “XXXX” is your Note. The “<!–” and “–>” is commend part that tells the editor that it is a Note.
Basically, anything inside “<!–” and “–>” only show up in the HTML editor and does not show up in the browser.