问题标签 [web-standards]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
864 浏览

css - 使用演示和弃用标签重置 CSS

为什么 Eric Meyer 在他的css reset中没有可取的、展示性的、不推荐使用的和非语义标签?(即applet、iframe、big、s、small、strike。)

0 投票
4 回答
240 浏览

xhtml - 向 img 标签添加重点。语义

我实际上正在编写一个网站,我对此产生了疑问。我有一张图片列表(这是一个艺术家作品集,所以应该是图片),其中一些带有“精选”徽章。将 img 包装成一个强标签而不是使用 class="featured" 在语义上是否正确?它会增加对图像的强调吗?

阅读 W3C 规范,它将 strong 和 em 称为文本级语义,但我不确定像 img 这样的媒体会发生什么。

太感谢了。

0 投票
1 回答
1530 浏览

xml -

Is there any difference in <noscript> block processing for pages served with MIME-type text/html versus those served with MIME-type application/xhtml+xml?

As far as I noticed <noscript> block for text/html pages is not processed at all if JavaScript is disabled in browser. And what happens for application/xhtml+xml pages? I suspect that for such pages the block is still analysed when JavaScript is disabled. But I failed to find any clarification of this issue.

Could someone point me to appropriate W3C standard or provide any other clarification?

PS. Situation of interest is visit counting services wich use <noscript> block to track visitors with disabled JS. If elements (for example, zero-sized images) of <noscript> blocks are downloaded in any case then such services should broke :(

0 投票
11 回答
74206 浏览

javascript - 我们不应该使用

I found some good cons here:

  • The noscript element only detects whether the browser has JavaScript enabled or not. If JavaScript is disabled in the Firewall rather than in the browser then the JavaScript will not run and the content of the noscript element will not be displayed.

  • Many scripts are dependent on a specific feature or features of the language being supported in order for them to be able to run (for example document.getElementById). Where the required features are not supported the JavaScript is unable to run but since JavaScript itself is supported the noscript content will not be displayed.

  • The most useful place to use the noscript element is in the head of the page where it would be able to selectively determine what stylesheet and meta elements get applied to the page as the page is loading rather than having to wait until the page is loaded. Unfortunately the noscript element is only valid within the body of the page and so cannot be used in the head.

  • The noscript element is a block level element and therefore can only be used to display entire blocks of content when JavaScript is disabled. It cannot be used inline.

  • Ideally, web pages should use HTML for the content, CSS for the appearance, and JavaScript for the behavior. Using the noscript element is applying a behavior from within the HTML rather than applying it from JavaScript.

Source: http://javascript.about.com/od/reference/a/noscriptnomore.htm

I very much agree on last point. Is there a way to make and add an external <noscript> file? Should we place <noscript> in the <head>?

0 投票
5 回答
118 浏览

css - 在 x/html 中编码联系信息的最佳方法是什么?

除了 Microformats 之外,在 x/html 中编码联系信息的最佳方法是什么?

使用<p><br/>可以吗?或者我们还有其他好的元素吗?

0 投票
25 回答
87616 浏览

flash - HTML5如何“取代”Flash?

自从 iPad 面世以来,人们再次看到的争论主题是 Flash 与 HTML5 的问题。有些人认为 HTML5 有朝一日会取代/取代 Adob​​e Flash。

我不开发在浏览器中运行的软件,所以我的(有限的)理解是:

  • HTML 是一种纯文本标记语言,通过 HTTP 传送到客户端浏览器。客户端浏览器根据标准规范解释标记并呈现(不同程度的成功)页面。
  • Adobe Flash 是用于处理音频、视频、声音和光栅/矢量图形的专有框架。它需要特殊的创作工具(也许是编译器?)和可作为大多数常见浏览器插件使用的自定义播放器。

有人可以(向这位 C/C++ 开发人员)解释一下,从技术/编码的角度来看,基于文本的标记语言 (HTML5) 如何可以被视为多媒体框架 (Flash) 的替代品?

请不要自以为是的论点 - 只是技术事实。

0 投票
6 回答
625 浏览

html - 在所有可能的事情上使用微格式有什么实际好处?

如果我在他的网站上为所有可能的事情使用微格式,我的客户可以获得哪些实际好处?

我如何向非技术客户解释这些好处?

0 投票
6 回答
43054 浏览

css - 正确使用 Blockquote、q 和 cite?

这是Blockquote, q和的正确用法cite吗?

使用Blockquote, q语义正确吗?或者两者都是表现元素,所以不应该使用?

0 投票
5 回答
3101 浏览

xhtml - 如何决定应该选择什么来使标题变粗

?

如何判断应该是什么<h2>h3 h4 h5 h6或者<p><strong>Some text</strong></p>如果我们不了解上下文

只有我可以轻松判断的页面标题<h1>

如何判断别人我总是从客户那里获得 MS word 2007 格式的内容,而客户总是使用 fontsize 来让事情变得越来越小。

我们如何才能最好地判断客户想要标题级别的位置以及他仅在样式中使用粗体文本的位置以及他真正想要强调文本的位置。

或任何标题级别

哪个对可访问性有好处?


Last.fm 的 api 仍然是网络上维护得最好的 api 之一。它的存在时间也比大多数都长,因为它基本上就是这样开始的。

http://www.last.fm/api

0 投票
2 回答
132 浏览

xhtml - 如果我们正在制作可访问的网站,我们不应该使用微格式吗?

微格式的类结构是否适合屏幕阅读器?

和这个(假设两个代码具有相同的内容信息)

哪种方法适用于可访问性和纯文本浏览器?屏幕阅读器在这两种方法下的表现如何?