What are all the valid self-closing elements in XHTML (as implemented by the major browsers)?

What are all the valid self-closing elements (e.g. <br/>) in XHTML (as implemented by the major browsers)? I know that XHTML technically allows any element to be self-closed, but I’m looking for a list of those elements supported by all major browsers. See http://dusan.fora.si/blog/self-closing-tags for examples of some problems caused by self-closing elements such as … Read more

Truncating long strings with CSS: feasible yet?

Is there any good way of truncating text with plain HTML and CSS, so that dynamic content can fit in a fixed-width-and-height layout? I’ve been truncating server-side by logical width (i.e. a blindly-guessed number of characters), but since a ‘w’ is wider than an ‘i’ this tends to be suboptimal, and also requires me to … Read more

How is the default submit button on an HTML form determined?

If a form is submitted but not by any specific button, such as by pressing Enter using HTMLFormElement.submit() in JS how is a browser supposed to determine which of multiple submit buttons, if any, to use as the one pressed? This is significant on two levels: calling an onclick event handler attached to a submit … Read more

OnChange event handler for radio button (INPUT type=”radio”) doesn’t work as one value

I’m looking for a generalized solution for this. Consider 2 radio type inputs with the same name. When submitted, the one that is checked determines the value that gets sent with the form: <input type=”radio” name=”myRadios” onchange=”handleChange1();” value=”1″ /> <input type=”radio” name=”myRadios” onchange=”handleChange2();” value=”2″ /> The change event does not fire when a radio button … Read more

Creating rounded corners using CSS [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more