无论对与错:我们应该始终使用正确的大写字母,切勿将整个句子全部大写
无论对与错:我们应该始终使用正确的大写字母,切勿将整个句子全部大写。如果我们必须这样做,我们应该使用 CSS 来完成此任务。”
如果我们需要的话,我们是否应该在其他情况下使用 CSS 属性 text-transform
?
(请注意,我不是在谈论 HTML 标签,我说的是文字内容)
阅读链接:
True or not: We should always use proper capitalization and never put whole sentences in all-uppercase. If we must do so, we should use CSS for this task."
Should we use the CSS property text-transform
for other cases if we need them?
(Note that I'm not talking about HTML tags, I’m talking about text content)
Links to read:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
啊?对于普通文本?对我来说,这听起来是一个荒谬的想法。每种语言都有其关于小写和大写的规则。为什么人们想要偏离这一点呢?
更新:抱歉 Jitendra,我没有仔细阅读您的更新。现在这个
很可能 - 例如,将 USA 拼写为 USA A。我可以想象一些屏幕阅读器会这样做。 但是这仅意味着不要将单词全部大写 - 这是您无论如何都要遵循的规则。
让所有文本都小写,并通过文本转换将正确的单词大写,您必须在每个需要大写的单词上放置一个 CSS 类 - 非常麻烦,会导致可怕的 HTML 汤,并且不会没有道理。只需使用正常的大写字母,不要全部大写。
Huh? For normal text? That sounds like a ridiculous idea to me. Every language has its rules about what's lowercase and what's uppercase. Why would one want to divert from that?
Update: Sorry Jitendra, I didn't read your update closely. Now this
could well be - say, for USA to be spelled like U S A. I could imagine some screen readers do this. But this would only mean not to put words in ALL CAPS - which is a rule you would want to follow anyway.
Having all text in lowercase and uppercasing the right words through
text-transform
, you would have to put a CSS class on every word that needs to be capitalized - extremely cumbersome, would result in horribleHTML soup, and wouldn't make sense. Just use normal capitalization, and don't use all caps.您应该像在论文中一样使用正确的语法、拼写和大小写来编写页面内容。导航和徽标应以大写字母开头(或者如果是名称,则为名称的正确拼写,例如 iPhone,而不是 Iphone 或 IPhone。)仅使用 CSS 大写进行样式化。因此,如果您希望站点名称全部大写(我的网站),请使用 CSS 使其全部大写,但在 HTML 中请确保其正确(我的网站)。
希望这有帮助!
You should write content of a page with proper grammar, spelling, and capitalization just as you would in an essay. Navigation and logos should start with an Uppercase (or if it's a name, the proper spelling for the name, e.g. iPhone, not Iphone or IPhone.) Only use CSS capitalization for stylization. So, if you want your site's name to be in all caps (MY WEBSITE) use CSS to make it all caps, but in the HTML make sure it's proper (My Website).
Hope this helps!
一般来说,集中精力阅读人们容易阅读的内容是个好主意。几乎总是,对于几乎所有类型的信息呈现,网站语言的传统排版规则都是合适的,并且如果没有充分的理由,您不应该做任何不同的事情。
It's generally a good idea to concentrate on what's easy for people to read. Almost always, for almost all sorts of information presentation, conventional typographic rules for the language of the site are appropriate, and you should not do anything different without having a really good reason.
W3C 规定所有 XHTML 元素和属性名称都应为小写:
至于标签之间的网页内容,当然没有必要。
The W3C states that all XHTML elements and attribute names should be in lowercase:
As for web page content in between tags, of course it is not necessary.
如果单词被识别为英语单词,Jaws 不会拼出单词。例如“这是正常发音的”。听起来与“这是正常发音”相同。处理缩写大小写问题时。例如,“usa”在语音上发音为一个音节。 “USA” 发音为“usa” 无论大小写如何,组成的单词往往发音相同,例如“FDIOSUF”发音与“Fdiosuf”相同
Jaws does not spell out words if they are recognized as English words. FOR EXAMPLE "THIS IS PRONOUNCED NORMALLY." sounds the same as "This is pronounces normally." When dealing with abbreviations capitalization matters. For example "usa" is pronounced phonetically as one syllable. “USA” is pronounced as “u s a” Made up words tend to be pronounced the same regardless of capitalization, for example “FDIOSUF” is pronounced the same as “Fdiosuf”
只需使用自然文本,就像您在 SO 问题中所做的那样。屏幕阅读器通常会将所有大写字母视为单个字母,因为此类文本通常是首字母缩略词(它可能因读者而异 - 有些人比其他人更聪明地处理事情,并且可能能够弄清楚整个句子不是“不太可能是缩写词)。
不过,您不必将每个字母都小写 - 屏幕阅读器在阅读“This Is A Sentence”时不会有任何问题。
非首字母缩略词的大写文本应使用 CSS 的
text-transform: uppercase;
来完成。Just use natural text, as you did in your SO question. Screen readers will generally read ALL UPPERCASE as individual letters, as such text is generally an acronym (it'll likely vary from reader to reader - some handle things more intelligently than others, and may be able to figure out that a whole sentence isn't likely to be an acronym).
You don't have to lowercase every letter, though - a screen reader shouldn't have any problem with "This Is A Sentence."
UPPERCASE text that isn't an acronym should be done with CSS's
text-transform: uppercase;
.它与屏幕阅读器无关。对于实际的内容,您应该使用正常的大写。对于元素名称和属性,如果您使用 XHTML,则必须使用小写,因为它区分大小写,并且规范规定标签名称和属性名称均为小写。这是两个完全不同的东西(内容与标记)。
编辑回复您编辑的问题:您应该避免不正确使用全部大写文本(这将是不正确使用的示例),因为屏幕阅读器很可能会在理论上它是 HTML 或 W3C 等缩写词。但是不全部大写与全部小写不同。在句子开头使用首字母大写等。不要使用全部大写来强调,使用
(或
,具体取决于类型的强调)。这样做会在语义上标记文本,这实际上帮助屏幕阅读器完成其工作(通过允许它在应该放置的地方强调)。
It has nothing to do with screen readers. For actual content, you should use normal capitalization. For element names and attributes, you must use lower case if you're using XHTML, because it's case-sensitive and the spec says the tag names and attribute names are lower case. These are two completely different things (content vs.markup).
Edit Re your edited question: You should avoid incorrect use of ALL UPPER CASE TEXT (that would be an example of incorrect use), because screen readers may well spell that out on the theory that it's an acronym like HTML or W3C. But not doing ALL CAPS is not the same as doing all lower case. Use initial capitals at the beginnings of sentences, etc. Don't use ALL CAPS for emphasis, use
<em>
(or<strong>
, depending on the type of emphasis). Doing so marks up your text semantically, which actually helps the screen reader do its job (by allowing it to put emphasis where it should be put).是的,你应该,如果你想修改文本字母,请使用 css 属性 text-transform http://www.quackit.com/css/properties/css_text-transform.cfm
yes you should, if you would like to modify the text letters use the css property text-transform http://www.quackit.com/css/properties/css_text-transform.cfm