semantic-markup

Can I use <nav> tag for list of article tags?

天大地大妈咪最大 提交于 2019-12-02 04:36:07
After the article I have list of tags related to article. Is it semantically correct to wrap list of those tags in <nav> html tag? If no, what would be the proper one? <nav class="tags"> Tags: <ul> <li><a href="#">Tag1</a></li> <li><a href="#">Tag2</a></li> <li><a href="#">Tag3</a></li> </ul> </nav> MDN states: Not all links of a document must be in a <nav> element, which is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't need to be in a <nav> element. User agents, such as screen readers targeting disabled users, can use

Escaping h outline

烂漫一生 提交于 2019-12-02 03:41:30
问题 So I’ve been trying to figure out what is the best way to add content after a being hooked to a lower level title. <section> <h1>Title of Section</h1> <h2>Related 1</h2> <h2>Related 2</h2> <p>I NEED THIS TO BE PART OF H1</p> </section> This is how it will come up on the outline: any content after the h2 will be related to that specific section. However, I would like it to escape that h2 and have it become part of the h1 . 回答1: Use sectioning content elements ( section , article , aside , nav

HTML5 time tag usage

拜拜、爱过 提交于 2019-12-02 03:19:58
问题 Can I use HTML time tag as below? <time>9:09 PM</time> My confusion is around the "PM" , whether I can specify it like this OR time is only for displaying 24 hr clock. 回答1: According to the W3C definition of the <time> tag, any content which represents a time without specifying also a day must be a valid time-string which it defines as follows: 1.Two ASCII digits, representing hour, in the range 0 ≤ hour ≤ 23 2.A ":" (U+003A) character 3.Two ASCII digits, representing minute, in the range 0 ≤

Proper heading for a table

筅森魡賤 提交于 2019-12-01 20:52:57
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 the table is filled with tabular data, OK. A table caption can contain free-form content. You could

Is it necessary to have <th> in any table?

假装没事ソ 提交于 2019-12-01 11:25:10
is it necessary to have <th> in any table? even if table has no heading? table has 3 other tag <thead> <tbody> <tfoot> is it necessary to use all even if i have nothing for table footer. Firefox by default add all these in code. and is it necessary , <th> always should be in a <thead> and if I have a heading in content received from client , and heading is from outside the table but related to table then how should i place that heading for table As a above table <h3>Heading of table<h3> <table>......</table> as a heading of table <table> <thead><tr rowspan=3><th>Heading of table</th></tr><

Is it necessary to have a heading of <section> in HTML5

北城以北 提交于 2019-12-01 11:08:54
Is it necessary to have a heading of <section> in HTML5 like mentioned here http://blog.whatwg.org/is-not-just-a-semantic Sometime on a page we have some elements which are related and can be combined in a <section id="semantic name"> instead <div id="semantic name"> But we don't have any Heading for that.. Is it OK to use <section> without having <h1> , <h2> , <h3> inside According to the HTML5 Doctor , you should not use <section> if there is no natural heading for it. Also, they say: The section element represents a generic document or application section…The section element is not a

Is it useful to #container, #Wrapper in every CSS layout?

别来无恙 提交于 2019-12-01 10:57:44
Is it useful to add whole code in #container , #Wrapper in every CSS layout? Can't we make layout without this extra div ? What are pros and cons to use this extra div ? Is it good practice ? Is it useful for any type of design/layout? Is it semantically correct? Is it useful to add whole code in #container, #Wrapper in every CSS layout? It would not be needed in every layout unless every layout was the same, and then only if they require a wrapper/container. Can't we make layout without this extra div ? Yes, you can sometimes dispense with the extra wrapper div. What are pros and cons to use

HTML5 published and modified time

柔情痞子 提交于 2019-12-01 09:13:12
I’d like to include published and modified time of an article. I looked through documentation and cannot find info about this. So far, I got this: <article> <h2>Summer</h2> <p>Also the favorite word of <strong>5000</strong> people more</p> <time pubdate="2009-11-13">1s</time> <time datetime="2009-11-13">10s</time> </article> The time element can’t have a pubdate attribute. (It was part of early drafts, but it got removed.) HTML5 itself doesn’t provide a way to specify that a date is a publication or a modification date. If you need to specify this in a machine-readable way, you could use an

Is it necessary to have a heading of <section> in HTML5

妖精的绣舞 提交于 2019-12-01 08:53:18
问题 Is it necessary to have a heading of <section> in HTML5 like mentioned here http://blog.whatwg.org/is-not-just-a-semantic Sometime on a page we have some elements which are related and can be combined in a <section id="semantic name"> instead <div id="semantic name"> But we don't have any Heading for that.. Is it OK to use <section> without having <h1> , <h2> , <h3> inside 回答1: According to the HTML5 Doctor, you should not use <section> if there is no natural heading for it. Also, they say:

Is it useful to #container, #Wrapper in every CSS layout?

只谈情不闲聊 提交于 2019-12-01 08:33:28
问题 Is it useful to add whole code in #container , #Wrapper in every CSS layout? Can't we make layout without this extra div ? What are pros and cons to use this extra div ? Is it good practice ? Is it useful for any type of design/layout? Is it semantically correct? 回答1: Is it useful to add whole code in #container, #Wrapper in every CSS layout? It would not be needed in every layout unless every layout was the same, and then only if they require a wrapper/container. Can't we make layout without