semantic-markup

Don't use <address> for address

余生长醉 提交于 2019-12-13 11:12:53
问题 Here is what the HTML5 spec says: The address element represents the contact information […] The address element must not be used to represent arbitrary addresses […] Isn't it ridiculous? They say "Don't use <address> for address". Why would they name that element address then? Maybe they had to name it <contacts> ? They say: "The p element is the appropriate element for marking up postal addresses in general" but hey, the <p> element is appropriate for anything then. It can be a piece of

<aside> tag usage confusion [duplicate]

冷暖自知 提交于 2019-12-13 04:22:09
问题 This question already has answers here : Why use an HTML5 semantic tag instead of div? [duplicate] (3 answers) Closed 5 years ago . I read about <aside> tag here: http://www.w3schools.com/tags/tag_aside.asp, but unable to understand the real motive of this tag. What is the difference between a content in this tag and the one outside? I mean if content is related but different than content surrounding this tag, then div can be used. What is special about this tag in comparison to other old

Same class names for different sections

 ̄綄美尐妖づ 提交于 2019-12-13 04:16:44
问题 Im writing a markup for Corpora - A Business Theme And have divided it into main sections in this way: <header> <div class="roof"></div> <nav></nav> <div class="slides"></div> </header> <div class="content"> <div class="roof"></div> <aside></aside> <div class="main"></div> </div> <footer> <div class="roof"></div> <div class="credit"></div> </footer> Is that okay to name different sections of the page with the same class name .roof ? [Edit] So, considering my .roof 's have different styling I

Can paragraph tags be one sentence long?

微笑、不失礼 提交于 2019-12-13 03:47:41
问题 I am confused by the meaning of the paragraph tag. Some websites use paragraphs for one sentence, but it doesn't really feel like paragraphs. Take for example this webpage. What tags would make more sense semantically for the elements "Professional Robust HDMI fiber extender for 4k video" and "HDMI 2.0 | 2160p60 | 18Gbps | HDR | 4:4:4 | HDCP 2.2"? Would you use a span , a div , or a heading for the first sentence? Same question for the second sentence. It doesn't feel like a paragraph, it's

Correct Semantic use of CSS Properties

一曲冷凌霜 提交于 2019-12-13 01:53:52
问题 Since it is recommended not to use table elements for layout purposes (non-tabular data), because the special formatting applied to those elements may change in the future, is it also not recommended to use CSS properties such as text-align , which was designed to be used on text, for img elements for the same semantic reason? I have been looking through the w3c specifications and for instance, line-height seems to be designed for text purposes and has plenty of references in the

Is there a better way to semantically code up an FAQ in XHTML 1.0 Transitional?

霸气de小男生 提交于 2019-12-13 01:09:00
问题 The following code segment for an FAQ, which uses XHTML 1.0, will not validate successfully in the W3C validator. I’m inserting the Q&A into a definition list in order to maintain the question & answer relationship semantically. The problem is, the questions can be multiple paragraphs. And the <dt> tag, at least in XHTML 1.0, only allows for inline elements. So I can’t put a <p> tag in there without throwing an error in the W3C validator. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0

Is <article> okay for truncated posts?

大城市里の小女人 提交于 2019-12-12 16:12:05
问题 I'm making a Tumblr theme (hold your criticism) and I'd like to use some semantic tags (since this seems to be something most themes don't have.) The way these blogs are styled is a main page full of posts that may be truncated, and may not be. You can then click a link and get a permalink to that post, or the full post if it's truncated. I want to use <article> for these posts on the main page, but I don't know if it's okay to put a truncated post in an <article> tag. I'd guess it'd be okay

Semantically marking up translations

好久不见. 提交于 2019-12-12 16:04:17
问题 I'm in the process of marking up an historical manuscript which has been translated from German into English. On the web page I will be providing both languages side by side. Is there an accepted way to markup such a scenario? I was thinking of splitting the translation blocks using the section tag and providing each with a lang attribute. However semantically this fails at communicating that one section roughly equates to the other. Any thoughts on this would be greatly appreciated. 回答1:

How to properly use the HTML semantic elements in a blog? [closed]

左心房为你撑大大i 提交于 2019-12-12 15:27:16
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 months ago . I read a lot of information on w3schools. It defines <section> as: The <section> element defines a section in a document. [...] A home page could normally be split into sections for introduction, content, and contact information. So, basically, a <section> can be a <header>

html5 semantic elements and old browsers

不羁岁月 提交于 2019-12-12 14:42:48
问题 I am about to design a new layout for a webpage and wanted to take advantage of this moment to implement some html5 markup. The first thing that comes in my mind are the semantic elements (nav, header, article..) After checking http://caniuse.com/#feat=html5semantic I noticed that IE8 (and below) don't support the elements. This probably means that I cannot style the semantic elements expecting a coherent result. The website receives quite a lot of traffic from IE7/8 browsers and I don't know