Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why gmail buttons is "div" tag and not "button" tag? [closed]

Tags:

html

css

gmail

Why gmail buttons is "div" tag and not "button" tag?

The gmail button code from chrome firebug:

<div id=":or" class="T-I J-J5-Ji ar7 T-I-ax7 L3 T-I-JO" role="button" tabindex="0" aria-expanded="false" style="-webkit-user-select: none; " aria-haspopup="true">
 <span class="Ykrj7b">More</span>
 <div class="G-asx T-I-J3 J-J5-Ji"></div>
</div>

Thanks in advance, Yosef

like image 798
Ben Avatar asked Dec 11 '11 12:12

Ben


People also ask

Why are my Gmail buttons not working?

Check Your Network Connection. A slow network connection could also be why some buttons are not working on Gmail. Since your browser can't communicate with the servers, some of Gmail's content could not be loaded on time.

How to give close button in HTML?

Add a close button using HTML, CSS, and JavaScriptCreate a button element in your creative using a <div> tag. Create the element in the HTML file and style it in the CSS file. Then assign the ID close-btn to your element.

Does the button tag have a closing tag?

Although this tag is often used in conjunction with the <form> element, it can also be used as a standalone control. The basic tag is written like this <button></button> . Any content between the opening and closing tags appears within the button.


2 Answers

Most likely for compatibility.

Internet Explorer 6 and 7 seem to be adding their own padding to button elements. Also, there seem to be width issues with button elements in those browsers when applying styles to them.

like image 157
Pekka Avatar answered Oct 16 '22 07:10

Pekka


I would assume its Google going to insane depths over performance, as behind the scenes the button element has one of the longer trips through the WebKit stack.

As shown in this video by Alex Russell.

like image 23
isNaN1247 Avatar answered Oct 16 '22 06:10

isNaN1247