I have a grid that displays some database records, and to the left of these I want to have edit/delete buttons.
I want these buttons to have a simple icon. I would use the following html:
<button class="grid-edit" type="button" />
<button class="grid-delete" type="button" />
and then a background-image
etc to make them visible and style them.
However I'm concerned that the HTML itself is not meaningful enough, with regards to the "semantic web" concept.
I see several options:
- Make the button have some text and hide it via CSS - but there is no proper cross-browser, no-hack way to do make text invisible AFAIK;
- Include an
<img>
element - butimg
should not be used for stylistic purposes; - Use
<input type="image">
instead. Is this the correct way?