-
Quotes in HTML string
Hi,
We are in the process of rewritting several ASP scripts to make them browser insensitive. Most were written with IE in mind.
The question of quotes came up. e.g.
Code:
<body bgcolor="#d0d0d0" text="#000000">
<form name="call_work" method="post">
<TABLE BORDER="1" CELLSPACING="5" width="100%">
Etc...
Questions:
Will most browsers recognise a single quote in place of the regular quote?
Which common browsers require quotes?
Thanks,
Al.
-
Do to the nature of HTML/XML, you should be able to use single quotes or double quotes. The browsers should not care. But you should be consistent throughout the entire document. I believe it is best practice to use double quotes, as you will find the need to quote things within your quotes.
Code:
<tag attrib="value" onMethod="Function('value');">
For the sake of arguement, check the W3C.
-
last i read, XHTML standard dictates double quotes
-
XML also requires double quotes.