×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How can you find the html version from source code.
2

How can you find the html version from source code.

How can you find the html version from source code.

(OP)
I have tried to figure out which version of html I am dealing with, but there are inconsistencies.
Q1: I have looked at !DOCTYPE html which I believe tells me it is HTML1.0. But should all!DOCTYPE show which version it has?

My main goal is to identify the version and if a version HTML1.0 is found I must convert it to HTML2.0.

Q2: Can dreamweaver 2014 1.1 convert HTML1.0 TO 2.0? If not, what would be the best approach?

Thanks.

RE: How can you find the html version from source code.

(OP)
Hi spamjim, I love that validator. Here is what I got:

Source
1.<!doctype html>↩
2.↩
3.<!--[if lt IE 9]>↩
4.<html class="no-js lt-ie9" dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml">↩
5.<![endif]-->↩
6.<!--[if gt IE 8]><!-->↩
7.<html class="no-js" dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml">↩
8.<!--<![endif]-->↩
9. <head>↩
10. ↩
11.<meta http-equiv="X-UA-Compatible" content="IE=edge">↩
12.<meta charset="utf-8">↩


...Still looking for the type of HTML or XHTML?

RE: How can you find the html version from source code.

The idea of a validator is to see if a document aligns with what you think the document should be. If you're using markup throughout the document that does not align with what you have declared, browsers will likely ignore your declaration.

That means, if you start with...

CODE

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> 

...but include some markup that only appears in HTML5, you should not expect this to be a true HTML2 document.

Why are you wanting to convert from a 20+ year old specification to another 20+ year old specification?

The line you have shared...

CODE

<meta http-equiv="X-UA-Compatible" content="IE=edge"> 

...suggests you are not actually dealing with HTML1 or HTML2 because this markup didn't exist 20 years ago.

RE: How can you find the html version from source code.

(OP)
I tend to agree with you. I am trying to make sense of the work I am being given. I know some about HTML, but people here aren't always sure of what they are talking about, and it makes my work much more difficult. It's okay, I know ultimately I will figure this out with some help. lol

I believe what they want me to do is to convert XHTML2.0 or older to XHTML4.0 not higher. I have noticed that in some source code from recent pages the word HTML4 is used, does it mean XHTML4, what is the difference?

Thanks again.

Sincerely.

RE: How can you find the html version from source code.

2
The internet is a much better authority on the differences of these.
https://en.wikipedia.org/wiki/XHTML

I'm still unclear about the requirement to update/convert to another standard. That is not usually needed for archived/legacy content. The idea is that if your doctype refers to something from 1998 and properly restricts its markup to that doctype, a modern browser will still know how to render that properly. The problem happens when you change the doctype but leave the original markup (or the opposite).

To that end, it may be best to just use a validator and set it to your target intent (HTML4, unaware of XHTML4). Then review/correct the bad markup that it flags.

RE: How can you find the html version from source code.

(OP)
That makes sense. Thank you so much for your great insights.

Sincerely,

Stephane

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close