The <u> tag is deprecated as it has no semantic meaning. Technically , you should use a <span class=“underline”> or something like that OR <em class=“underline”> (if there is some actualsemantic emphasis to this content) and use CSS to style the tag eg.: .underline{ text-decoration: underline; }.
Unless you are using an HTML5 doctype, ‘placeholder’ IS NOT a valid attribute. I am not sure if this has anything to do with it, but you have single quotes for your placeholder and double quotes for everything else.
The reason that <u>…</u> is deprecated is because webmasters are strongly advised not to underline text on a web page except for clickable links. Unless there’s a very good reason for underlining the text, you should generally use <strong> or <em> instead if you want the text to stand out.
The placeholder attribute is not supported in IE9 and under but most other modern browsers versions support it including IE10. It is only valid in the html5 doctype but will work in other doctypes in those browsers that support it but just will not be valid.
Thanks for posting but please read previous posts before making a reply as duplicating information already provided is not necessary and will look like fluff. Thank You.
Ralph has given you a full working example in Post #13 so just copy that example. It will work with whatever doctype you use but as long as JS is enabled. Just copy and paste and you will see that it works.
(Even the html5 placeholder attribute will work in other doctypes as long as the browsers supports it but will of course not be valid. )
Is there a placeholder for XHTML1.0? I tried searching Google but didn’t find anything that worked.
I’ve answered this a few times now but I’ll try again
The “placeholder” attribute is a new attribute added to html5 only. There was never anything before this - all you had was the value attribute for the default value.
Modern browsers ie10 and latest Fifexox, Safari etc all support the placeholder attribute but it will only be valid if you use the html5 doctype. As I said above the placeholder attribute will still work in those same browsers with any other doctype but just not be valid.
Yes, it’s fine to do that. You can place the form itself in an include file and place it on every page, and you can place the script in an external js file and link to it on each page where the forum appears. Normally I would place all of the links in the <head> of the document and put them inside a single include file, so that I only have to edit them in one place. But this is a separate include from the form.