W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] a and button

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 19 Oct 2008 10:02:10 -0500
Message-ID: <dd0fbad0810190802v4f0603a9h9d737aa397deda3a@mail.gmail.com>
On Sun, Oct 19, 2008 at 9:54 AM, Philipp Serafin <phil127 at gmail.com> wrote:

> On Sun, Oct 19, 2008 at 2:57 PM, H?kon Wium Lie <howcome at opera.com> wrote:
> > I'd like to have a simple way of using <button> along with <a> to
> > create pretty links. This markup works in Opera, Mozilla, and Webkit:
> >
> >  <a href="http://www.w3.org/"><button>W3C</button></a>
> >
> > but it's not valid HTML5 it seems. I propose to make it valid.
> >
> > The inverse (a inside button) only works in Webkit.
> >
> > Cheers,
> >
> > -h&kon
> >              H?kon Wium Lie                          CTO ??e(R)?
> > howcome at opera.com                  http://people.opera.com/howcome
> >
>
> What's wrong with
>
> <button style="text-decoration: underline; color:blue">W3C</button>
>
> ?


The one real difference that I've run into with links and buttons is that
buttons are shrink-to-fit in block-display, while links are not.  This only
matters when you actually *need* to display them as block, frex when
centering, though many of these situations can be fixed by putting
text-align on the parent.
~TJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081019/19fee884/attachment.htm>
Received on Sunday, 19 October 2008 08:02:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC