Can I set the HTML DOCTYPE element by a CSS stylesheet? I am trying to convert a 3rd party application where I do not have access to the raw HTML files and need to set the DOCTYPE.

2 answers

danwellman 5600
This was chosen as the best answer

No, not with CSS, and probably not reliably even with JS. It can be accesed in some browsers but I don't think it can be changed.

What is the 3rd party app written in?

Answered about 9 years ago by danwellman
  • I am working with a product called WebTrac. Is was created by Vermont Systems, Inc. It is an application developed to handle Parks and Recreation class schedules and payment processing. Michael Kniskern about 9 years ago
  • If the application doesn't provide a mechanism for doing this, perhaps in the templating system it uses to create the raw HTML pages, it probably won't be possible... danwellman about 9 years ago
  • Contact the company that produces the software; maybe they will work with you. Doug about 9 years ago
  • Already contacted them. There is no way to set the doctype of the HTML through their current interface. Michael Kniskern about 9 years ago

Why is it that you need to change the doctype? You may be able to accomplish what you want without changing it.

Answered about 9 years ago by Josiah Sprague
  • I was able to accomplish what I wanted by editing the CSS file. We are currently in the process of applying a new visual layout to our website and we need to change all of our 3rd party applications. The conversion would be very easy with setting the doctype of the HTML. Michael Kniskern about 9 years ago