Jump to content

XHTML and such


actionsketch

Recommended Posts

I'm kinda confused as to where the world of website scripting is headed. It seems like it's becoming needlessly more complicated. I want to be convinced that XHTML and Xforms are really better than good old traditional HTML.I like to make my websites in traditional HTML because when I'm scripting it, I'm looking for the fastest and most effecient way to get what I want. If my goal is speed and effeciency, why then would I want to use a language that requires me to add a / to the end of every <br>? Why would I want to spend the time trying to get my elements aligned in the center using css and declairing both text-align: center and margins: auto when all I have to do is add a nice little <center> tag? Not only that but, If we wanted to discuss readability, <center> makes a heck of a lot more since.and these Xforms... now to do what would take 5 lines of scripting before, now takes 18 lines? Why would I want this? seriously... look at this:

<xforms><model>  <instance>  <person>    <fname/>    <lname/>  </person>  </instance>  <submission id="form1" method="get"   action="submit.asp"/></model><input ref="fname"><label>First Name</label></input><br /><input ref="lname"><label>Last Name</label></input><br /><br /><submit submission="form1"><label>Submit</label></submit></xforms>

and now the same thing in good ol traditional:

<form id="form1" method="get" action="submit.asp"><input type="text" name="fname"><br><input type="text" name="lname"><br><input type="submit" name="Submit"></form>

CSS on the other hand, I love. It seems to be moving in the right direction. It just needs some support for basic stuff like math and variables. Also add some more conditions. Then I could do stuff like "width: div.container.width+30px;" or "input:onfocus { border-color: red; }" without having to use javascript.Anyway... am I crazy? Am I the only one who sees this, or am I not seeing something?

Link to comment
Share on other sites

I think the BR one's right, to be honest. If you were new to the language, and saw:<B>text</B><I>text</I>etc..you'd think it'd be<BR></BR>Which is where it becomes confusing... <BR /> is a nice way of sorting out "self-closing" tags, like <base /> etc.Center is a bit of a weird tag. I personally love it, and use it all the time. IMG is being depricated in the next XHTML isn't it?I agree that XHTML / XFORMS need to be taken with a pinch of salt, but the language is only at 1.0/1.1, i suppose.http://www.ajaxian.com/archives/2005/06/html_5_vs_xhtml.htmlA nice article :)

Link to comment
Share on other sites

It's just a proposal at the moment, I believe.

yeah, but some of it is implemented in FF(didn't try IE)... some of the new forms stuff works and it says canvas works but it's buggy.EDIT:you can see a demo of <canvas> at http://developer.mozilla.org/samples/rayca.../RayCaster.htmlI'm not sure about the compatability but I use the FF beta and it works good.
Link to comment
Share on other sites

In the end it's all for the best. I write my site in XHTML 1.1 and wouldn't ever write it in html 4. Also you don't need to write a bar tag like <br /> you can just write <br></br>, but it is slow and stuff... Also, html is based off of sgml which is a little dorkyand messy to me.

Link to comment
Share on other sites

  • 3 months later...

A few things...The beauty of CSS is that you can go into ONE .css file, make a few changes to the look of a page, fonts, borders, colors, etc. and it changes all of your html pages that are linked to your css file. Love it! If I want to make all of my <h3> tags a little bolder, find it in the css file, change one word, and sit back and look at the results. Same with the color or font family, etc. You would have to search for all of your <h3> tags and modify your font, color and add an opening and closing bold tag...so much work. CSS is much more efficient.There is some wrapping your head around the float element(at least for me) and getting pages centered in various browsers and what not, but it's all great once you figure it out and play with it a bit.Making your website xhtml compliant isn't that big of a deal and is very simple. I used the validator for about 3 or 4 html pages and went through all the changes...now I only get 2 or 3 errors or less when I create new pages.

Link to comment
Share on other sites

Your goal should be to be programming for the end user - then you should be concerned with your efficiencies. Having said that, all these changes are geared around making things more portable and more expandable. A more portable and more expandable website makes things easier to change for the user in the long run.So, the focus of efficiency is not just one of the short term. You have to think a lot farther down the road. I've spent countless (but billlable) hours recoding crap from previous developers - those "code in the now" fellas. Stupid <center> tags and useless <font> tags littering the page and making all the changes that need to be made very hard to find.If things are coded like Xforms, for instance, then it is conceivebale to understand that at some point a change in site design and layout would never come from the raw code anymore, but just from something like a CSS file. Right now, 99% of the folks have to change the HTML file, all or some of the code in it, and the CSS file just to implement a new look and feel to a site or page. If you conform to standards as they are designed, then you will be seperating content, from design, and both of those from function. This is when it all comes together, when you don't have to change all three things when you just want to change one. And that's why traditional HTML is, well, traditional and XHTML is the right direction.

Link to comment
Share on other sites

I remember building websites before CSS was added to browsers, and it wasn't pretty :)And about the "<br>" annoyment you seem to have, it's just 1 extra key stroke to make it <br />. The > and / keys are right next to each other on the keyboard.By the way, your site has 10 errors on it :)@ ~Shinta, correct use of XHTML 1.1 isn't supported by IE6, so I'd stick with XHTML 1.0 Strict if I was you :(Correct use of XHTML 1.1 requires that you send the document as application/xhtml+xml and IE6 only supports text/htmlHopefully IE7 will support application/xhtml+xml, I'm not sure as it's not publicly released yet and I don't have a Beta copy to test on.

Link to comment
Share on other sites

About xforms for a sec...can anyone help me here? I went through w3schools.com's tutorial on it and on the First Page, near the bottom under the heading "All Together Now" if you use the code mentioned there in an html file, you're supposed to get the two text boxes and a submit button. I get the text boxes, but no submit button. The label "Submit" is there, but no button...I've tried everything I can think of, and can't get it to work. Help...Please!!!

Link to comment
Share on other sites

XHTML and CSSXHTML is a document, marked for paragraphs, headers, divisions, etcCSS designs it, fonts, text-decorations, margins, etcif we all use the standards, it will be easier for various browsers to come into existance. this is vital with the growing mobile devices market, such as web-enabled cell phones, smart phones, PDAs and pocket PCs. it takes a lot to be a fully standards-compliant web designer, but it's worth it when you web page looks the exact same in IE6, Firefox, Opera, Links, Lynx, your cell phone, a blackberry...it's all about the ease of portability.

Link to comment
Share on other sites

I remember building websites before CSS was added to browsers, and it wasn't pretty :)And about the "<br>" annoyment you seem to have, it's just 1 extra key stroke to make it <br />.  The > and / keys are right next to each other on the keyboard.By the way, your site has 10 errors on it :)@ ~Shinta, correct use of XHTML 1.1 isn't supported by IE6, so I'd stick with XHTML 1.0 Strict if I was you :(Correct use of XHTML 1.1 requires that you send the document as application/xhtml+xml and IE6 only supports text/htmlHopefully IE7 will support application/xhtml+xml, I'm not sure as it's not publicly released yet and I don't have a Beta copy to test on.

I have a php script to change the mime type thanks to someone on this forum.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...