A DOCTYPE Declaration

  powerless 17:06 26 Sep 04
Locked

I've noticed this when viewing some sources on some sites.

PCA for example: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

Is it important?

Do I need to declare a doctype, then agin what is a doctype?

  Simon_P 18:02 26 Sep 04

It is a sandard set of rules for different types of html/ xhtml

click here WC3 Doctype

click here WC3 Home

  Forum Editor 23:31 26 Sep 04

which HTML version you've used, and so do any software tools which you may use to validate your code.

If you include a DOCTYPE Delaration (DTD) you'll find that browsers can load the page faster, and with less chance of errors.

  powerless 19:04 27 Sep 04

Err Frontpage does the HTML where will it tell me the version?

  Taran 21:27 27 Sep 04

You have to manually add the relevant code.

To save fooling around with inserting code on a page-by-page basis and if you want to stick to a default DTD, say HTML 4.0 Transitional, you can manually edit the normal.htm template that FrontPage generates new pages from to suit. Open it from its location (normally C:\Program Files\Microsoft Office\Templates\1033\Pages\normal.tem) and alter its content to something more desirable, like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "click here">

<html lang="en">

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

</body>

</html>

Note that the above will include a Click Here hyperlink, so right click on it to copy the code that makes it up.

You can either edit the original FrontPage template or simply create a new page, paste the above code into it and then save it as a template using the File, Save as and in the 'Save as type' dialog choose FrontPage Template. Give it a name and the next time you create a page you can choose your template with the relevant DTD from those listed. Using this method you can create several templates for different DTD and code types.

If you look at the Microsoft site under their Office/FrontPage section, there are lots of help and tutorial documents available on all sorts, from using FrontPage with PHP to creating accessible sites.

FrontPage 2003 also has the the Tools/Accessibility drop down menu as well as the Optimise HTML features, among other things.

  Taran 21:35 27 Sep 04

Bascially, FrontPage does not create pages with DTD code by default; the above post was intended as a brief walk-through of how to either create your own page templates to base pages on or how to paste the relevant code into an existing page header.

The obvious advantage to creating your own template instead of modifying the original FrontPage template or altering a bunch of pages already coded up is that you still have the original template intact and you can make whichever DTD page types you need for future use, from HTML to XHTML in Transitional or Strict, depending on what you want and how you want to work.

I'm not sure whether I'm making thigs even more murky with this, so I'll leave it and see how you get along.

T

  powerless 22:23 27 Sep 04

So I can either copy and paste, upon creation of a new page.

Or modify the normal.tem [once] so that when opeing a new page it incldes the doctype everytime.

I'll try the last option.

May I email you Taran?

  Forum Editor 22:39 27 Sep 04

that you modify the template - otherwise you'll find you've forgotten to add the DTD to some pages after you've published the site - it's easy to overlook.

  Taran 22:47 27 Sep 04

Email away.

I'm offline in a few minutes until tomorrow afternoon but if you come unstuck, by all means, get in touch.

T

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…