web-standards

Why HTML 5 still have support for Presentational elements?

五迷三道 提交于 2019-12-01 16:57:02
问题 See list here: http://www.w3schools.com/html5/html5_reference.asp like <b> , <i> , <br> , <hr> , <small> ? Is it means no cons to use these? But what about content and presentation seperation? 回答1: Two reasons come to mind: Because some people (not me, here is a primer about this opinion and here are the WHATWG FAQ about this) don't think of them as presentational. They argue, that <b> has semantics of its own, for example, where <strong> is not right and the text should be bold anyways (IMHO

Standards on behaviour of nested labels

喜欢而已 提交于 2019-11-30 23:50:28
问题 I was wondering what would happen if I'd nest 2 <label> tags, and it turns out, in all the most recent versions of all browsers, except for Opera , clicking the inner label results in only that label being clicked. Here's a demo of nested label tags' behaviour. My question is: Are there any standards on the behaviour of browsers when handling click events in nested labels? All I could find was this MDN section about Gecko's behaviour, but I couldn't find anything about the other browsers. The

Is it good to put <p> inside <td> to put content text?

北城以北 提交于 2019-11-30 17:01:08
Which is more semantic and valid? <td> <p> content text </p> </td> or <td> content text </td> Leave out the <p> tag unless the content of your table cell is truly a paragraph. It's certainly possible to have paragraphs in tabular data, and in that case a semantic <p> would be appropriately placed. But for the common table with data in the cells eg. numbers, names, etc., don't include the <p> . netrox It depends on your intention. If the cell is going to have just ONE paragraph then it makes no sense to add the <p> tag to it. If you intend to have a few paragraphs in the <td> cell then it makes

ie9-js - has something else rendered it obsolete?

孤者浪人 提交于 2019-11-30 16:41:12
问题 So, everyone knows ie9.js (from http://code.google.com/p/ie7-js/). It seems to work, but it never left beta since the last release in 2010. Obviously, there are some other things that do something a bit similar (such as modernizr, html5shiv, and CSS3Pie), but they aren't quite the same (not least because they need to be applied per-feature or are more limited in scope). Is it still considered good practice to use it for modernisation? Should I be using something else? 回答1: ie9.js is still a

What does “href” stand for? [duplicate]

廉价感情. 提交于 2019-11-30 15:40:26
This question already has an answer here: What does “href” stand for in HTML? 4 answers After writing html for couple of years I realized that I don't really know why the href attribute is named "href" . The HTML Recomendation does not shed light on the subject by saying : This attribute specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute. Also the HTML 4.01 DTD does not provide a lot of clue . href %URI; #IMPLIED -- URI for linked resource -- I could make an educated guess for the

Why are CSS3 PIE and other similar scripts not in use everywhere?

女生的网名这么多〃 提交于 2019-11-30 15:21:29
This question has already been asked at htc files: Why not to use them? , but the answer didn't answer anything really. The question is, why is something like CSS3 PIE not in use on many sites? I'd expect smaller ones to not know about it, but the one that caught my eye was Twitter, who doesn't use it. Is it because it's not standard? Or does it cause a noticeable slow-down of the site? Thank you for any responses. I can't speak for everyone, but my sense is that you don't see tools like these in use on large sites because: 1) They do incur a certain performance cost. CSS3 PIE in particular

What is the best way to create standards-based, cross-browser compatible rounded corners in Drupal?

不羁岁月 提交于 2019-11-30 10:10:51
I am currently working on a Drupal 6 theme, for which designer is explicitly requesting to use A LOT of rounded corners. I could of course create the rounded corners - traditionally - with images. But I know there must be also better and easier ways of creating rounded corners. Optimally, I would like to write my CSS as standards-compliant CSS3, with selectors like: h2 {border-radius: 8px;} Use of browser-specific is CSS is very OK also, like h2 {-moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px;} If required, I can also insert some custom JavaScript by hand. I just want

How important is it to follow web standards? [closed]

℡╲_俬逩灬. 提交于 2019-11-30 08:16:57
I recently found out that most of the major websites fail W3C's markup and CSS validation tests . Therefore, how important is it really to follow web standards? STANDARDS! A Bit of History Before going straight to the answer, I believe it is important to state the context of the latest standard. Did you know that the W3C had been trying to develop a XHTML 2 standard? If it would have came out it wouldn't be backward compatible with previous versions of HTML. In fact, a rebellion formed within the W3C and ended with a group that simply part ways to create the WHATWG . The WHATWG are the real

Why <big> is not in HTML 5 Tag list while <small> is?

不问归期 提交于 2019-11-30 01:05:46
Shouldn't both be removed? Or does it mean we should use <small> ? Why is <big> removed but <small> is not? What is the problem with <big> which does not apply to <small> ? http://www.w3schools.com/html5/html5_reference.asp Remember, the tags are meant to be semantic, not presentational. There is such a thing in English as "fine print". This is what the small tag represents. There is no analogous concept of "big print" except for a header, which is already covered by seven other tags. <small> is used more frequently, for footnotes and such...with <h1> , <h2> and <h3> there just wasn't a use

Is it good to put <p> inside <td> to put content text?

霸气de小男生 提交于 2019-11-30 00:57:40
问题 Which is more semantic and valid? <td> <p> content text </p> </td> or <td> content text </td> 回答1: Leave out the <p> tag unless the content of your table cell is truly a paragraph. It's certainly possible to have paragraphs in tabular data, and in that case a semantic <p> would be appropriately placed. But for the common table with data in the cells eg. numbers, names, etc., don't include the <p> . 回答2: It depends on your intention. If the cell is going to have just ONE paragraph then it