Wednesday, September 14, 2016

Form Action

According to this page on W3C, the action attribute is no long required for self-referencing forms in HTML 5. The page says that it prefers to see the attributed removed to being left with an empty. It does not like action="".

The old style tag might be


The shortened string is simply


I tested this change on four different browsers. They all submitted the form correctly. The vast majority of forms I write are self-referencing. I am always happy when I come across a change that makes things cleaner.