semantic-markup

Is there an HTML5 tag to signify an article preview?

不羁的心 提交于 2019-12-12 13:25:05
问题 The description for an article element read: The article element represents a component of a page that consists of a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. However, I'm interested in showing a preview

Multiple <header> and <footer> in a HTML5 document

ⅰ亾dé卋堺 提交于 2019-12-12 08:37:20
问题 Is it Allow and Ok to use multiple <header> and in HTML 5, if yes then is it not semantically incorrect and will confuse to screen reader users? I saw many site uses like <body class="home"> <header class="hd1"> <hgroup> <h1>HTML5 Documnet</h1> <h2>tagline</h2> </hgroup> </header><!-- .hd1 --> <div class="main"> <section class="hs1"> <header> <h1>This is a Page Sub Title</h1> </header> <p>Some content...</p> <h2>Demonstrating EM and STRONG</h2> <p><strong>This text will have more importance

What is semantic markup, and why would I want to use that?

廉价感情. 提交于 2019-12-12 07:56:42
问题 Like it says. 回答1: Using semantic markup means that the (X)HTML code you use in a page contains metadata describing its purpose -- for example, an <h2> that contains an employee's name might be marked class="employee-name" . Originally there were some people that hoped search engines would use this information, but as the web has evolved semantic markup has been mostly used for providing hooks for CSS. With CSS and semantic markup, you can keep the visual design of the page separate from the

Should multiple <article> elements in a <section> be put it in <ul> tags?

≡放荡痞女 提交于 2019-12-12 01:34:33
问题 I'm using the new HTML5 tags and and I was wondering which of the following two options is preferable: OPTION 1 <article class="menu"> <section> <header> <h4>Breakfast</h4> </header> <ul> <li> <article class="menu-item">Cereal</article> </li> <li> <article class="menu-item">Bacon & Eggs</article> </li> <li> <article class="menu-item">Waffles</article> </li> </ul> </section> <section> <header> <h4>Lunch</h4> </header> <ul> <li> <article class="menu-item">Peanut Butter & Jelly</article> </li>

HTML-tag to annotate the origin of a section?

懵懂的女人 提交于 2019-12-11 23:17:43
问题 Google don't like it when you use same content across multiple sites, according to some. Is there any way to annotate/tag a block of content with the "source". Something like an attribute: <div original-content="http://some.url"> The purpose is solely to let Google that we have duplicated the content (I.e. not as part of a search ranking strategy). Search engines could then use this information somehow. 回答1: This might help you out: http://searchengineland.com/google-creates-metatags-to-help

What is preferred accessible and semantically correct method to code this type of data design?

被刻印的时光 ゝ 提交于 2019-12-11 11:48:26
问题 What is preferred accessible and semantically correct method to code this type of data design? Table UL, LI DIV,SPAN For icons should i use for each place or i should is icon from CSS sprites? If we use css sprite here then how to code, and what will happen when images will be disabled ? Every link will open in new window and I have to indicate about file size also for both sighted and blind users? So what is the best method to make this design and what is best method to show icon and to

Wrapping semantic elements with non-semantic elements

跟風遠走 提交于 2019-12-11 10:38:33
问题 I am wondering if can I wrap semantic elements with non-semantic elements for layout purposes. Do screen-readers etc. get only directly childs (like > CSS selector) or can I wrap as much as I want? Examples div wrapping header <section> <main> <div> <header> <h1>Page title<h1> </header> </div> <article>[...]</article> </main> </section> Another div 's wrapping header <body> <div> <div> <header> <h1>Page title<h1> </header> </div> </div> </body> 回答1: You may add as many div and span elements

How to markup advertisement?

余生颓废 提交于 2019-12-11 08:53:10
问题 How to markup advertisement to have it excluded from search? My specific problem is that I have the below code outside the main and article elements on my pages. Going from a purely semantic to a real world problem: Sharing a link to my page on Google+, Facebook, and Twitter will use the advertisement image to represent the content. <aside> <a href="http://www.example.com/ad" rel="nofollow"> <img src="/example_com.png" /></a> </aside> The social networks’ documentation tells me how to specify

Is there a proper way to make responsive text?

拈花ヽ惹草 提交于 2019-12-11 08:16:56
问题 I've oftentimes had designers give me responsive designs where the wording of an element changes based on the size of the screen. Desktop : Read more Mobile : Read Desktop : Download PDF Mobile : Export Desktop : Click here Mobile : Tap here What is the correct way to have different text in mobile and desktop versions of a website? 回答1: You could use media queries, pseudo classes and some ingenuity for this: a[data-mobiletext] { background-color: #FC0; } @media screen and (max-width: 700px) {

How do I override the numbering for one specific li in an ordered list

纵然是瞬间 提交于 2019-12-11 08:07:36
问题 I'm transcribing legal documents that come with ordered lists, but there's a catch. Law-makers are lazy and when adding a new clause between clauses 2, and 3, they name it 2A. As an example, here's some original text: 6 High treason (1) Any person who abrogates or subverts or suspends or holds in abeyance, or attempts or conspires to abrogate or subvert or suspend or hold in abeyance, the Constitution by use of force or show of force or by any other unconstitutional means shall be guilty of