Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help Required Re: DOCTYPE

Featured Replies

Hello Everyone,

 

I am Steve, a humble web designer from the Midlands who has been designing websites for 10 years now, all self-taught, but i have come across a customer who has been given some advice by one of his freinds. i have never entered the DOCTYPE line ever but would like to start, all my websites are done in Frontpage and contain various files within like flash, small .php contact forms and xml galleries (all from wysiwyg little software programs like coffeecup).

 

Q1. Is there a DOCTYPE i can insert that can cover all the above, i have looked throught the internet and the "Transitional" one looks to be the best but i just want to use the same DOCTYPE line for all of my websites.

 

Q2. I notice in the DOCTYPE it states html 4.01, i use frontpage and am unsure if when if the finished websites are hmtl 4.01? i always thought html was just html.

 

Any help would be greatly appreciated, thanks in advance!!!

I think most experts would advise to try the Strict version first (either for HTML 4.01 or XHTML 1.0 depending on how you have coded your tags).

 

As a general rule, XHTML requires lower case for all tag names and self-closing tags should be closed /> instead of just > like <hr /> <br /> and meta tags, input tags and a few others closed /> instead of just >. All other XHTML tags should have a closing tag like </p> or <h5> etc. whereas HTML does not in fact require them but it's good practice to close with </p> or </h5> etc. even in HTML 4.01.

 

Transitional is used if you have some items causing a problem with a Strict doctype, like deprecated tags and target="...". Validate your pages here http://validator.w3.org/ Doctypes are here

http://www.w3.org/QA/2002/04/valid-dtd-list.html

 

You need a doctype because it helps browsers stop guessing the standards to apply to your code. They are good at guessing but it helps them to have a doctype. In particular IE needs a doctype to avoid quirks mode where the padding and borders are inside the box dimensions whereas they are outside with a doctype. Doctypes should include the url link to w3.org.

 

In future there will be HTML5 for normal websites which is the next HTML doctype version and the doctype is just <!DOCTYPE html> and XHTML future versions will be only for specialist websites like SVG and MathML and inappropriate for normal websites. XHTML 1.0 will still exist but become redundant. See Item 1.6 HTML vs XHTML in the W3C HTML 5 page http://dev.w3.org/html5/spec/Overview.html says "The first such concrete syntax is the HTML syntax. This is the format recommended for most authors" ie HTML not XHTML.

 

 

I would also advise you to ditch FrontPage, it's way out of date now. Use Dreamweaver or Microsoft Expression Web 4 which supersedes FrontPage.

  • Author

I think most experts would advise to try the Strict version first (either for HTML 4.01 or XHTML 1.0 depending on how you have coded your tags).

 

As a general rule, XHTML requires lower case for all tag names and self-closing tags should be closed /> instead of just > like <hr /> <br /> and meta tags, input tags and a few others closed /> instead of just >. All other XHTML tags should have a closing tag like </p> whereas HTML does not in fact require them but it's good practice to close with </p> even in HTML 4.01.

 

Transitional is used if you have some items causing a problem with a Strict doctype, like deprecated tags and target="...". Validate your pages here http://validator.w3.org/ Doctypes are here

http://www.w3.org/QA/2002/04/valid-dtd-list.html

 

You need a doctype because it helps browsers stop guessing the standards to apply to your code. They are good at guessing but it helps them to have a doctype. In particular IE needs a doctype to avoid quirks mode where the padding and borders are inside the box dimensions whereas they are outside with a doctype. Doctypes should include the url link to w3.org.

 

In future there will be HTML5 for normal websites which is the next HTML doctype version and the doctype is just <!DOCTYPE html> and XHTML future versions will be only for specialist websites like SVG and MathML and inappropriate for normal websites. XHTML 1.0 will still exist but become redundant. See Item 1.6 HTML vs XHTML in the W3C HTML 5 page http://dev.w3.org/html5/spec/Overview.html says "The first such concrete syntax is the HTML syntax. This is the format recommended for most authors" ie HTML not XHTML.

 

 

I would also advise you to ditch FrontPage, it's way out of date now. Use Dreamweaver or Microsoft Expression Web 4 which supersedes FrontPage.

  • Author

Thanks for your reply, i don't want to sound an idiot but although i produce websites they are more the wysiwyg methos, rather than coding, so when i use frontpage, this is just html, so where does the v4.01 come in? Does Frontpage produce sites in a particular version or is v4.01 as you say, what the world wide web uses to read websites?

 

and secondly (sorry), if i use the strict html version, will this make a difference if on some pages i have xml galleries within a html page, can i still just use the strict html version, thanks again for your patience...

 

Steve.

You can use a doctype with FrontPage, see this tutorial

http://msdn.microsoft.com/en-us/library/aa218654%28office.11%29.aspx

but it might affect the page display and you would then need to understand the code to edit it, which might be difficult for you if you only use WYSIWYG, so it's up to you if you add a doctype.

 

As far as I know, if you were to put an XML document online all by itself, you wouldn't have a doctype as the first code would be the XML declaration, but if you are inserting the XML gallery into a web page, then the web page has a doctype (HTML or XHTML) as normal.

@Stephen - HTML 4 is absolutely fine as a DOCTYPE to produce and if you want to validate your site you will need a DOCTYPE.

 

And you don't 'sound like an idiot' - you would be more silly not asking a question than asking for help!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.