views:

269

answers:

8

If I use XHTML transitional doctype then will it show (in my portfolio) like I'm not a professional expert?

It is for one client who is not paying much for work, and he doesn't know about Web Standards. I want to use some deprecated or presentational item to save time so what should I give to him?

  • Site with XHTML strict but with some validation errors

                 or
    
  • Site with XHTML transitional but with W3C validation

What would be good if I add that site in portfolio?

+4  A: 

There's no point using a strict doctype if you're going to break it. Use transitional.

Skilldrick
+1  A: 

The point is not if it will validate or not .. the points is why would you even consider using a doctype that you do not adhere to ?

Gaby
+5  A: 

Use whatever you comply with. Using a "strict" doctype will not prove you're a "professional".

Professional developers don't get hung up on the doctype definition you use, unless you have no doctype. What matters is the structure of your portfolio, both visually and in your markup/css/javascript.

Using a "strict" doctype vs. a transitional doctype has nothing to do with how "professional" you are. If you look at StackOverflow, you'll see even they use HTML 4 as their doctype, not even XHTML, and they did that as an intentional design choice, not an afterthought.

Dan Herbert
Why did you say "not even"? XHTML is not a "must". XHTML is only useful if you use a XML based tool to build/generate/parse/etc websites. There's no need to massage HTML into XML flavor if there's no need to do so.
BalusC
@BalusC - Can u explain what is the means of "XHTML is only useful if you use a XML based tool to build/generate/parse/etc websites". I never use any XML based tool then should i use HTML?
metal-gear-solid
@BalusC: full ack; I would even go so far to say that by using XHTML, the author explicitly states that the document can be processed by XML tools; if the document fails to validate (or possibly isn't even well-formed), he just publicly announced that he doesn't know what he's doing...
Christoph
@Jitendra: because of IE, your code must be HTML-compatible anyway, ie you can't do anything with XHTML that you couldn't do with HTML; this is where the whole `content-type` foobar comes into play; this means you should only use XHTML if you (the author) use XML tools yourself or want others to be able to do so to process your page; if the pages then don't follow the standards, you can't guarantee the latter, which makes using XHTML superfluous
Christoph
@BalusC I used the phrase "not even XHTML" very loosely, and only to mean that StackOverflow is using an older standard than the 2 mentioned in the question.
Dan Herbert
@Jitendra: think about component based MVC frameworks like JSF on Facelets. It's however entirely op to you which doctype to choose, only ensure that it validates :) I personally don't see any value of using XHTML if you can "just do it" with HTML, it's too overhyped.
BalusC
A: 

Why not get rid of the deprecated elements? Seriously, you only need them if you don't use CSS properly, and if you don't, then that's what shows that you're not a 'professional'.

Also, in my opinion XHTML documents should always validate. If you create tag-soup, use HTML.

Christoph
+2  A: 

Standards are just that. Standards, a conventional guide. A "book of best practices". XHTML Transitional is a good score on a portfolio.

Compare this:

Opening a link on a new window, with XHTML Transitional:

<a href="about:blank" target="_blank"></a>

Same task, on Strict, requires a JavaScript approach, i.e.

<a href="about:blank" rel="new_window"></a>
<script type="text/javascript">
var links = document.getElementsByTagName("A");
for (link in links)
{
  if (links[link].rel.toString().indexOf("new_window") > -1)
  {
    links[link].onclick = function(e)
    {
      window.open(this.href, '', '');
    }
  }
}
</script>

Don't complicate yourself. Whatever you use, use it good.

Joel Alejandro
keep in mind that there are reason for the deprecation of `target`; I myself don't allow the browser to open pages in new windows, and I know quite a few other people who do the same
Christoph
Yes, I noticed later that my "target" example wasn't the best to explain my point ;-) Thanks for the heads-up
Joel Alejandro
The target attribute was deprecated in transitional, and removed in strict, was because frames were deprecated. That it became convention to open new windows that way is just an annoying footnote, now that some browsers let you ignore the directive.
Anonymous
A: 

Though there are some good reasons to use the transitional doctype, whenever I see a new page using it, I automatically question whether the author is using Dreamweaver or similar program to create it, and I always question the author's ability when they use deprecated elements without reason.

Rob
+2  A: 

The mark of a professional, IMO, is to understand what your customer would like to accomplish with your work, have the ability to explain to them the values and limitations of various alternatives, and for you to skillfully implement their choices. When you are up for another job and the employer is asking to see a portfolio you can show them the work and explain why certain design decisions were made.

Mike Chess
+1  A: 

"XHTML Transitional" is not a rubbish, it's a standard, like all other standards are. It has its sharp and clear rules and all your web project should run 100% correctly until you keep that standard. (e-e-e... IF the browser fully supports that standard, ha-ha. That question needs googling...)

Using "Strict" is a little bit preferable but don't be ashamed of using "Transitional". But avoid copy-pasting "Strict" code inside "Transitional" project as I did once =)


PS: there is one small thing... XHTML 1.1 needs adding [CDATA... inside <script></script> but almost nobody does that (google, yahoo, digg..etc etc) . And their sites keep working. What would you say?. Google on it's start page writes <!doctype> and they are wiser then we are

Dan
Actually, `<!doctype html>` which is just the HTML5 doctype. You can use it as if HTML4 strict. Also see http://hsivonen.iki.fi/doctype/
BalusC