doctype

Any reason not to start using the HTML 5 doctype?

<!DOCTYPE html> It is supposed to be backwards compatible with HTML4 and XHTML. John Resig posted about some of the benefits. As long as we don't use any of the new and not supported yet features, would there be any downside to start building sites with this doctype?...

Must DOCTYPE be the very first tag in an HTML document

Our security manager (Tivoli Access Manager, TAM) dynamically inserts a bit of javascript at the top of every html page when requested. It is inserted above the DOCTYPE statement. I think this might be the cause of the layout problems I am having. Ideas anyone? ...

What are the best practices for using html with xml based languages like svg?

From browsing on this site and elsewhere, I've learned that serving websites as xhtml at present is considered harmful. Delivering xhtml and serving it as application/xhtml+xml isn't supported by the majority of people browsing at present, delivering xhtml as text/html is at best a placebo for myself, and at worst a recipe for breaking ...

how to disable dtd at runtime in java's xpath ?

I got dtd in file and I cant remove it. When i try to parse it in Java I get "Caused by: java.net.SocketException: Network is unreachable: connect", because its remote dtd. can I disable somehow dtd checking? ...

What are the different doctypes in html and what do they mean?

As the title describes, what are the different doctypes available and what do they mean? I notice that the layout looks a little different in IE7 when I switch from <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1...

HTML DTDs - what's the point?

Being fairly inexperienced with certain aspects of web development (I've always concentrated more on the back-end than the front), can anyone give me their thoughts on whether I should worry about the DOCTYPE declaration made at the beginning of web pages? Is the most common HTML 4.01 and should I build my web apps to conform to this st...

.NET XmlDocument : Why DOCTYPE changes after Save?

I am opening a XML file using .NET XmlReader and saving the file in another filename and it seems that the DOCTYPE declaration changes between the two files. While the newly saved file is still valid XML, I was wondering why it insisted on changing original tags. Dim oXmlSettings As Xml.XmlReaderSettings = New Xml.XmlReaderSettings() oX...

javascript style.width not working in firefox with transitional doctype

I have a script that animates a small DIV popping up on the page. It all works fine in IE, and in FF if I remove the DOCTYPE, but when the DOCTYPE is XHTML/Transitional, in Firefox, the width does not change. this.container.style.visibility = "visible"; alert("this.container.style.width before = " + this.container.style.width) this.con...

DocType xhtml1-transitional.dtd ignores table cell height

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <link href="Stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <table style="height: 100%...

How do I make Standards mode work as well as quirks mode?

The following Html works great for me in FireFox or IE7/8 (with or without the Style Tag) <!-- Deliberately no DocType to induce Quirks Mode --> <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <style type="text/css"> Input.quirks { margin: 1px 0px 1px 0px; border: solid black 1px; ...

Strict DOCTYPE affecting spacing between images.

I am having problems with my image spacing when I switched to XHTML Strict DOCTYPE. The following code - which uses Yahoo's reset stylesheet to kill off all default browser padding - leaves a gap of about 4 pixels between the two images below but ONLY when I use the strict doctype. Why is this? It is only a problem in Chrome and Firefo...

Can i make an XSLT transformation directly in html page ?

I know namespace are used to describe, like doctype, but is there a way or a trick to transform inner namespace html with an xsl using xsd ? <?xml version="1.0" encoding="UTF-8"?> <!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" x...

How can I ignore DTD validation but keep the Doctype when writing an XML file?

I am working on a system that should be able to read any (or at least, any well-formed) XML file, manipulate a few nodes and write them back into that same file. I want my code to be as generic as possible and I don't want hardcoded references to Schema/Doctype information anywhere in my code. The doctype information is in the source d...

css background color disappears with doctype

I'm trying to set background colours on a few different elements in an html page, but whenever I apply a doctype declaration the colours get ignored. Other styles seem unaffected. I'm sure I'm being an idiot. It happens on IE7, FF3 and Chrome. With Strict and Transitional html 4 Doctype. Body and Div backgrounds are affected. A minimal ...

Why is XHTML 1.0 Transitional so popular?

My company is looking to replace all websites in the group with a new CMS-based system and similar designs/styling, with E-Commerce functionality being added in a future phase. It's too big a job for me to do in a reasonable time-frame, so we are going to be inviting tenders from agencies. I'm currently in the process of defining the te...

Problems with DOCTYPE resolution and ASP.Net

In a previous question I mentioned some work with a 3rd party DLL whose interface uses a series of XML inputs that are defined using DTDs. Everything has gone smoothly so far, but I still have this nagging issue with resolving the Document Type Declaration in the generated input values. What I can't figure out is what the deciding facto...

Using a doctype with XML

I'm using a seperate .dtd file as a doctype for my custom xml file: names.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE name SYSTEM "names.dtd"> <names> <name> <text>Pep&eacute;</text> <creator>&lost;</creator> <history>&lost;</history> </name> <name> <text>Charles</text> <crea...

CSS floats with unknown widths don't wrap whitespace with doctype

Two divs, floated left, of unknown width. One of them has more content than fits the page, so it moves below the first (except in IE): http://corexii.com/floatproblem/float.html Add display:inline-table; and the big one wraps its content (consistently across browsers): http://corexii.com/floatproblem/table.html But introduce a doctyp...

Strict doctype preventing access to DOM variable in FireFox

I don't know if this is a well known 'thing' or something new in whatever version of Firefox it just updated itself too - but in either case I have no idea how to google for this question so I'll have to ask it here. I have a DIV in my DOM that I am trying to directly access by id, in the most simplest form like this: alert(btnTest.id...

How can I test the markup validity of a string (webpage) in .Net?

I've written a VB.Net page to browse my site. It stores the HttpWebResponse in a string. How can I validate the markup validity of the page in .Net? - something similar to W3's validate by direct input option. I'm looking for something that can identify the DOCTYPE, validate it yes or no, and return a list of failures I can display. ...