XHTML

User 629005 Photo


Ambassador
2,174 posts

So, me being fairly new (dabbled in HTML years ago, when the cool sites had a few pics on them and all else was simple text) I decided to look into improving my skills. I found on w3schools that XHTML is where they are wanting people to be on web design. It really doesn't seem that difficult, just more formally structured it seems.

So I'm just wondering how many people here have started down the path of X. The hardest thing for me (so it seems) will be remembering to KEEP all tags in lowercase. But I'm going to try to keep on track.
Living the dream, stocking the cream :D
User 355448 Photo


Ambassador
3,144 posts

Phil,

I have made a few pages using XHTML, but have not taken the time to convert all my pages. To help me, I use a couple of Firefox addons. I can then upload the page, look quickly at the lower left corner of my browser window and see if I have a green check mark. If I do not have the green check mark, I look at the code and see where my error is located. Sometimes the errors listed are wrong due to an error near the top of the code, but those are easy to find once you realize what is happening.

The addon I use the most is HTML Validator (currently version 0.8.5.2). I also have Web Developer 1.1.6 which will allow me to set my browser to specific window sizes.

The HTML Validator uses Tidy to verify the code, and is a great help with coding errors.
User 471275 Photo


Ambassador
1,130 posts

You might want to check out the CC html editor. Go to tab document and in the drop down menu one from the bottom it says 'covert to xhtml and lowercase'. I have not played with this feature yet but am now going to check it out tomorrow.


User 463058 Photo


Ambassador
1,073 posts

I haven't bothered. HTML 4.01 Strict is fine, and even IE 8 still doesn't support xhtml, so everyone has to serve there xhtml pages as if they are regular html pages. So for all practical purposes, they're just writing mangled html code. Of course, if you are using WordPress, then you have to code with xhtml, even if you won't ultimately gain anything from it.

If you do use xhtml, do not use 1.1. It is only intended for use when the xhtml is going to be served correctly.
User 629005 Photo


Ambassador
2,174 posts

ad99wd wrote:
You might want to check out the CC html editor. Go to tab document and in the drop down menu one from the bottom it says 'covert to xhtml and lowercase'. I have not played with this feature yet but am now going to check it out tomorrow.



Just tried it out myself. The only bad thing I saw (and I'm sure it's accurate of being XHTML "strict") is that it stripped all comments out of the page, thus stripping out Coffee Cups comments that this page was created with CC Software.
Living the dream, stocking the cream :D
User 471275 Photo


Ambassador
1,130 posts

Phil and that by CC :) They strip out their own comments :)

User 463058 Photo


Ambassador
1,073 posts

Phil wrote:
Just tried it out myself. The only bad thing I saw (and I'm sure it's accurate of being XHTML "strict") is that it stripped all comments out of the page, thus stripping out Coffee Cups comments that this page was created with CC Software.


I just tried it myself and there were three problems.

1. It adds the xml declaration above the doctype which throws IE browsers into quirks mode. Very bad. Make sure you never have that or anything else, including blank lines, above your doctype.

2. The opening html tag was missing the necessary xmlns attribute:

<html xmlns="http://www.w3.org/1999/xhtml">


3. This one is really bad. The meta tag for character encoding wasn't closed correctly using " />"

Instead, it was left the same and followed by the title tag, the body tag, the body content, the closing body tag, and then the closing meta tag, and then the closing head tag???
User 355448 Photo


Ambassador
3,144 posts

Phil wrote:
Just tried it out myself. The only bad thing I saw (and I'm sure it's accurate of being XHTML "strict") is that it stripped all comments out of the page, thus stripping out Coffee Cups comments that this page was created with CC Software.

Phil,

According to W3Schools, the comment tags are valid for all XHTML 1.0, and I haven't seen anything on their site about XHTML 1.1. http://www.w3schools.com/tags/default.asp the first tag listed on their list.
User 629005 Photo


Ambassador
2,174 posts

Huh, wonder why CC HTML Editor is removing them then? Especially since it removes the credit that you would think they'd love to leave in there?

Scott? Oh, Scott... Any ideas? Possible oversite? I know there are more important things going on in CC world right now, but maybe this is something that needs to be put on a list. I tend to like to put comments in my pages (at least until I post them), and have had one request to leave them in.
Living the dream, stocking the cream :D
User 364143 Photo


Guest
5,410 posts

I now do all new work in transitional xhtml. I figure I should get used to xhtml over HTML 4 now even though browsers are not going to stop supporting HTML 4 over night.

Although I understand the concept of separating structure from data of strict xhtml, I hate the idea of cluttering up a css file with a lot of crap when a single inline style attribute can handle it just as well.
CoffeeCup... Yeah, they are the best!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.