semantic-markup

Proper heading for a table

℡╲_俬逩灬. 提交于 2019-12-20 01:52:09
问题 A matter of semantics. If I have a HTML page that is basically one big table, what element do I use for a header? Ordinarily, you'd use a h1 for the heading of the page, and a caption for the table's heading. But what if the table is the only thing on the page? Including both looks a bit silly. So do I use a h1 and forget about the caption , or vice versa? Are there formal (W3C or WHATWG) recommendations about this? If so, I can't find them. PS For the sake of this question, let's assume that

Differences between <q> and <blockquote>

主宰稳场 提交于 2019-12-19 18:48:29
问题 There are several articles about this topic but I'm not able to understand the relevant difference between <q> and <blockquote> . The spec seems to have changed for blockquote link. It seems that long quotations are reserved for blockquote and inline quotation for <q> . What do they mean with inline quotations? Does one need to have the name of an author? For example: what if the quote is of a company and its one long sentence. I would use <q> but I would not know exactly how to defend that

Semantic implications of multiple <dd> tags

心不动则不痛 提交于 2019-12-19 07:13:07
问题 When using <dl> lists to associate keys to values, is there a semantic difference between these 2 samples? Which one provides better semantics? What do multiple <dd> tags imply in this context? Sample 1 : Multiple <dd> items. <dl> <dt>Authors</dt> <dd>John Lennon</dd> <dd>Paul McCartney</dd> <dt>Genres</dt> <dd>Pop</dd> <dd>Rock</dd> </dl> Fangs output: Definition list of two items Authors equals John Lennon equals Paul McCartney Genres equals Pop equals Rock List end Sample 2 : Single <dd>

Facebook link thumbnail

陌路散爱 提交于 2019-12-18 21:27:09
问题 When posting a link to a website in Facebook (Google+ and the rest count too) you're given a thumbnail, or selection of thumbnails to choose from. These are tags from the HTML. I've always been of the opinion that it was good practice to make my logo a background image inside a h1 tag using CSS. I make the h1 tag a link back to the home page and hide the header text with something like {text-indent: -9999px}, leaving a lovely semantic HTML header. Here's a link to my site if you want a look:

Is 'en-EU' a valid value for HTML 'lang' attribute?

十年热恋 提交于 2019-12-18 13:15:54
问题 Markup for different editions of my news site... US Edition: <html lang="en-US" xml:lang="en-US"> ... </html> India Edition: <html lang="en-IN" xml:lang="en-IN"> ... </html> Europe Edition (in this case not a specific country, i.e. news covers a broader region): <html lang="en-EU" xml:lang="en-EU"> ... </html> I am depending on the markup of the page to make the target language/region of pages clear to the search engines because the different editions of the news site use a directory-based

Semantic HTML of an articles list

情到浓时终转凉″ 提交于 2019-12-18 10:41:12
问题 In a typical index of articles (like a blog without excerpt) like this image: those items should be a list ( <ul><li> ) or just divs? And also, they should be figure/figcaption? Because would make some sense, but also... picture is part of an artcile not the main content, so maybe title/description is not the caption of the image, but the caption of the article. what do you think? EDIT: a live example - https://news.google.com/?hl=en 回答1: I’d use an article for each snippet (i.e. a news

HTML 5 semantic tags

送分小仙女□ 提交于 2019-12-18 09:34:05
问题 I have read about some of the semantic elements on W3C, WHATWG, and MDN, but I still a little unclear on somethings. I also went to this article, on Sidebar and Aside are different!. I have a few basic questions, or confirm that I am understanding what I have read: Is the aside element not a sidebar? In HTML5, can we use semantic and div tags? When there are no semantic tags to use, is a div tag acceptable in HTML5 (this may be the same question as above)? Can the semantic main element have

Proper use of HTML heading tags

我是研究僧i 提交于 2019-12-18 09:06:09
问题 I'm having trouble understanding the proper usage of HTML headings. I'm using books and online resources to self-learn but there are slight discrepancies on how to use them. [1] "Note that the h1 tag is only used once, as the main heading of the page. h2 to h6 , however, can be used as often as desired, but they should always be used in order, as they were intended. For example, an h4 should be a sub-heading of an h3 , which should be a sub-heading of an h2 ." OR [2] "the logical heading

What's the best HTML5 tag to use for marking up blog excerpts?

拥有回忆 提交于 2019-12-17 23:32:12
问题 It's a common pattern for blogs to have archive pages (eg by date or category) which list relevant blog posts, along with excerpts (a paragraph or) and a link. I can't quite work out which of the HTML5 elements it's best to use for the individual posts, however. The <article> tag might seem like a good fit (and certainly would be if you were displaying the whole content), but I'm not sure whether it's appropriate for excerpts. The specification says: The article element represents a self

Use of profile attribute in HTML head tag

爷,独闯天下 提交于 2019-12-17 23:09:22
问题 What is the use of profile attributes in the HTML <head> tag? I happened to read about it in here : http://www.w3schools.com/tags/tag_head.asp. I could not understand this(http://www.w3.org/2002/12/namespace) either, since it is too technical (for me). I have never used it. What is the purpose it serves? 回答1: The URI in the profile attribute points to a document containing information regarding metadata. Profiles defines properties that may be used by the HTML meta tag and the HTML link tag .