doctype

How do you detect DOCTYPE (Transitional or Strict) server-side in ASP.NET?

I am wondering if there is a way to detect from the server-side which DOCTYPE the page is specified as. I have some HTML and CSS in a custom WebControl that renders differently depending on which DOCTYPE the page is. Is there a Page property or a Response property I could check? ...

What DOCTYPE should I target today?

I'm refactoring a .Net web application that is in <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > Right now the approach is just to aim for the stars and go for the latest doctype just because it's latest, I would like to make a wiser choice and target a specific one and for good reasons. There are similar questions...

ActionMailer, HTML emails and DOCTYPE

I noticed that the examples in the Rails 3 Action Mailer Basics guide use HTML5 doctype tag <!DOCTYPE html> for HTML emails. Older Rails 2 guide examples use Transitional doctype. As far as I know, HTML emails must use the most basic, old-style HTML code with some deprecated tags, so various email clients display it properly. This sugges...

Netbeans XML Editor is clobbering my custom hibernate DOCTYPE

This is happening in hibernate, but not a hibernate problem. I'm seeing this with the default XML editor for Netbeans 6.9 We do a little trick to avoid a bunch of boiler plate in our hibernate files: <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0....

Adding doctype url causes eternal refreshing

I have a page that had the doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> I need to add the URL to the end, or jQuery's datepicker does not display correctly. When I make the doctype say: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; The page b...

In the summer of 2010 is it time to start using HTML5?

I created this question as community wiki in the hope that it and its answers will be edited as the situation with HTML5 changes. Time to use HTML5? This question gets trotted out about once a year, so I might be beating a dead horse, but is it finally time (in the summer of 2010) to use HTML5 when developing a brand new web site? Rel...

Invalid markup with XFBML and RDFa

EDIT: I switched back to XHTML 1.0 Transitional. It renders fine, but isn't valid. Help is still appreciated. Hello. I am trying to integrate the Facebook plugins into my website, PlugB. To make them validate at W3 validator, I added a XHTML + RDFa doctype. But I am getting errors with Iframes and FBML. How can I fix this? http://val...

Why do elements look different with the XHTML Transitional doctype applied?

I have a simple page with two elements: <html> <body> <input type="text" style="height: 18px; width: 120px" /><br/> <select style="height: 18px; width: 120px"> <option>test</option> </select> </body> </html> In an attempt to make it w3c compliant and to display consistently across browsers, I've added a DOCTYPE e...

How to replace DOCTYPE declaration using fiddler?

Im having trouble finding doctype of response using fidder. I was trying to google this topic and it wont help. Any ideas? ...

DOCTYPE CSS problem

When I added <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; line to the top of my html file, my css rules disappear in firefox. Also i can't see them with firebug. Do you have any idea about this problem ? ...

Why is ie7 always in Quirks mode?

Here is the DOCTYPE and XML declaration that I am using: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; But still IE7 is always going to quirks mode... Does anyone have any idea as to why? Thanks in advance! ...

XSLT, Doctype and Google-Map v3 not working

Hello, I'm trying to include a GoogleMap v3 (everything was okay with v2) in my HTML pages generated with XLS Transformations. My JS code comes from this page. Basically, the map works correctly when everything is in plain HTML, as per the example, however when I try to include it in the XSL stylesheet, Firefox (v3.6) complains and doe...

Adding a Doctype to the document dynamically using JavaScript

Hello all I want to detect whether a doctype exists for the current document and add one if nothing exists. I'm able to check whether a doctype exists using document.doctype. But how can i add one? ...

DIV content does not overflow...

The code below works properly in all browsers but IE. The overflow doesn't work. Thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <style type="text/css"> #scroll { width: 500px; height: 250px; overflow: auto; } .box { position: relative; height: ...

What are the dangers of not conforming to declared HTML doctype?

I have an ASP.NET MVC 2 web site, the site.master declares <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; but in the code I have <td class='count-col' data-object-id='<%= Model.ObjectId %>'> Am I correct that attribute ...

link rel="script" usage

I am reading through the XHTML 1.0 Strict Doctype and found out that there's a value of "script" for the rel attribute on the link element. <link rel="script" href="..." /> I tried using this tag to link external JS files, but Safari does not even load the file. So what can the tag be used for? Update: After rereading the DTD, it do...

Doctype tag preventing menu to work properly only in IE7

I got a sidebar menu from DynamicDrive. I changed it a bit so that can be used from right to left. It works perfectly in all browsers except IE7. After loads of debugging I found out that when I remove the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"&gt; tag it...

Can I have <SCRIPT> tag inside <TABLE>?

I got to have a tag inside a table because PHP writes a code there that adds stuff to an earlier created Javascript array. However, I get a validation error (4.01 strict). Is there any way I can do this or is it simply forbidden to keep a script like this: <TABLE> <TR> <SCRIPT></SCRIPT> <TD> </TD> </TR> <...

XHTML Transitional rel attribute alternative

I'm trying to add some custom data within a tag to reference later in a jQuery call, and I usually use "rel=" for something like this. However, I'm working in an XHTML Transitional document, and it gives me a "there is no rel attribute". Are there any alternate attributes I can use to attach custom data to an HTML tag while still kee...

jQuery and piroBox don't like <!DOCTYPE html>

I'm trying to use the piroBox (http://www.pirolab.it/pirobox/index.php) jQuery plug-in to make a gallery. I'm also using <!DOCTYPE html>. With this DOCTYPE, the images that are supposed to appear in a modal dialog appear at the bottom of the page. Removing the DOCTYPE makes it perform as expected. Is there any way to make the plug-in an...