semantics

Creating two columns layout - html/css semantics

南楼画角 提交于 2019-12-02 04:15:58
I want to create a very simple liquid layout with 2 columns - the one to the left will have a fixed width, and the one to the right will be dependent to the window size. The layout will contain 4 elements - the header, navigation, content, and the footer. I have a couple of questions according to the semantics of HTML5 elements here. This is the code: <body> <div id="container"> <header> <div id="header"> sadfsdf </div> </header> <nav> <div id="nav"> gdfsgf </div> </nav> <article> <div id="article"> gdffgdg </div> </article> <footer> <div id="footer"> gdfsgf </div> </footer> </div> </body> 1)

Is it a good practice to put <article>s inside <li>s?

拜拜、爱过 提交于 2019-12-02 01:27:30
问题 Typically on the front page of a blog, there are several recent blog posts, and each blog post is an <article> . And usually blog comments are markuped using <article> s, too. My question is: Is it a good practice to put those <article> s inside <li> s? I used to do that because in my own interpretation those <article> s together are presented in a way of a certain amount / quantity . So when it comes to listing a certain amount/quantity of elements, <ul> and <ol> are the best choices.

Is it a good practice to put <article>s inside <li>s?

此生再无相见时 提交于 2019-12-01 21:17:26
Typically on the front page of a blog, there are several recent blog posts, and each blog post is an <article> . And usually blog comments are markuped using <article> s, too. My question is: Is it a good practice to put those <article> s inside <li> s? I used to do that because in my own interpretation those <article> s together are presented in a way of a certain amount / quantity . So when it comes to listing a certain amount/quantity of elements, <ul> and <ol> are the best choices. However, maybe I need to reconsider my interpretation because putting <article> s inside <li> s seems to be a

How to mark-up a button for WCAG 2.0 Compliance?

懵懂的女人 提交于 2019-12-01 20:26:33
In striving for WCAG 2.0 Compliance, I'm finding quite a bit of varied information regarding proper treatment of buttons, specifically what is required to consider the button accessible and compliant. What is the appropriate way to mark-up a <button> ? What attributes or combination do they need to have? My buttons fall into three categories: Buttons that have text that describes their intended action. (e.g. "Learn More" to launch a modal with more product information) Buttons that have text that does not describe their action. (e.g. "X" or text that titles a section of accordion content)

Semantics of “>>” operator in F#

人盡茶涼 提交于 2019-12-01 09:18:39
In Microsoft's F# samples , they use the ">>" operator as follows: test |> Seq.iter (any_to_string >> printfn "line %s"); What does the ">>" operator do in this context? Is each item of the sequence (an array in this case) get passed to any_to_string implicitly? Is this similar to (fun item -> printfn "line %A" item) ? An equivalent piece of code could be written the following way: test |> Seq.iter(fun x -> printfn "line %s" (any_to_string x)) In other words, the >> operator simply does this: given a function f(x) returning type T and g(y) with y being of type T, you can use f >> g to create a

How to differentiate between a Thing and an inanimate object with SPARQL

僤鯓⒐⒋嵵緔 提交于 2019-12-01 09:03:03
Using SPARQL, I can get all related info about some resource quite easily, but I'm having a hard time figuring out how to actually differentiate between things and things -- in which Thing is the super class of all classes, and things that are inanimate objects, like a cup, spoon, pencil, etc. For example, here are a few innanimate objects in DBPedia: Fork: http://dbpedia.org/page/Fork Jar: http://dbpedia.org/page/Jar Envelope: http://dbpedia.org/page/Envelope Baseball glove: http://dbpedia.org/page/Baseball_glove Screwdriver: http://dbpedia.org/page/Screwdriver Here's the thing -- I know that

It is semantically correct to use <header> inside <section>?

岁酱吖の 提交于 2019-12-01 08:51:01
All examples I found on internet refers to using <h1> inside <section> , but nothing related to the use of <header> element. It's valid HTML5, but what about semantics? Maybe I'm misusing the <section> element, for the completeness here is my use case: <main role="main"> <header>page header</header> <section id="cookiesPolicy> <header> <h1>Cookies Policiy</h1> </header> <div>Bla bla bla bla bla bla bla</div> </section> <footer>page footer</footer> </main> Yes it is semantically correct to use header inside section header – There is a crucial difference between the header element and the

CSS, nested divs & margins vs. padding

五迷三道 提交于 2019-12-01 07:49:07
i totally understand the box model. this question is more about trying to pin down a semantic methodology regarding when to use margins and when to use padding. here is a typical example, first, in plain English: situation: we have a container div, inside of which there is a paragraph element. goal: to have a 12px space between the inside of the div and the outside of the paragraph. option a) apply 12px of padding to the container div option b) apply 12px margins to the paragraph element or, if you prefer, HTML: <div id="container"> <p>Hello World!</p> </div> and, CSS: option a) div#container

How to differentiate between a Thing and an inanimate object with SPARQL

守給你的承諾、 提交于 2019-12-01 06:53:44
问题 Using SPARQL, I can get all related info about some resource quite easily, but I'm having a hard time figuring out how to actually differentiate between things and things -- in which Thing is the super class of all classes, and things that are inanimate objects, like a cup, spoon, pencil, etc. For example, here are a few innanimate objects in DBPedia: Fork: http://dbpedia.org/page/Fork Jar: http://dbpedia.org/page/Jar Envelope: http://dbpedia.org/page/Envelope Baseball glove: http://dbpedia

It is semantically correct to use <header> inside <section>?

坚强是说给别人听的谎言 提交于 2019-12-01 06:50:14
问题 All examples I found on internet refers to using <h1> inside <section> , but nothing related to the use of <header> element. It's valid HTML5, but what about semantics? Maybe I'm misusing the <section> element, for the completeness here is my use case: <main role="main"> <header>page header</header> <section id="cookiesPolicy> <header> <h1>Cookies Policiy</h1> </header> <div>Bla bla bla bla bla bla bla</div> </section> <footer>page footer</footer> </main> 回答1: Yes it is semantically correct