semantic-markup

Display heading inline with following paragraph

為{幸葍}努か 提交于 2019-12-03 06:59:52
Given the following semantic markup: <h3> SCOPE OF WORK. </h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> I would like to display the heading inline with the paragraph, like so: SCOPE OF WORK. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut

Divide Width of Element Between Child Divs With CSS

*爱你&永不变心* 提交于 2019-12-03 06:49:50
问题 I have a varying number of inline-block divs that I want to collectively take up 100% of their parent. Can this be done without JavaScript ? The only way I can think of is with a table but it's of course bad practice to use a table solely for layout purposes. |----------------------| |{ div 1 }{ div 2 }| or |{div 1}{div 2}{div 3}| |----------------------| I have also tried { display:block; float:left; } but it doesn't seem to make a difference. 回答1: You can use display:table-cell on your

When is it semantically correct to use the hr element?

断了今生、忘了曾经 提交于 2019-12-03 04:45:44
The HTML5 reference says that The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book. That description is not enough descriptive to me. I use the hr element in my HTML documents as a way to separate content. Is this correct? Could anyone give a few examples on when to use it (apart from the examples shown) and when to use CSS styling instead? daniel_gamage It's proper to use it when you have, say, several paragraphs with two distinct themes. <p>Paragraph about domestic kittens</p> <p

Is there any guide on “When to use display:block when :inline and when :inline-block” and why?

喜欢而已 提交于 2019-12-03 03:21:28
问题 Do you know any good article on "When to use display:block when :inline and when :inline-block " and why? and when we will have to override display:?? through css for any HTML tag/element? 回答1: inline - Treats the element as though it were an inline chunk of text. width and height are meaningless block - Treats the element as as rectangle. width and height can be specified inline-block - Flows a element inline with the text, but allows width and height to be specified. Elements default to one

What html markups to use for displaying label/value data?

落花浮王杯 提交于 2019-12-03 02:40:42
问题 I want to render a profile user container that contains a list of labels and their associated values. Here is an excerpt of information and layout I'd like to display: First Name .......MyName Age ...................MyAge email ................MyEmail I know that there are tons of examples available but the problem is that it seems that there is no commonly accepted solution. So far I have seen the following usage : Table with markup (and < tr >,< td >...) Unordered list with < ul > markup

What is the cite attribute for?

孤者浪人 提交于 2019-12-03 02:10:15
The cite attribute specifies the address of the source of the quoted text, I think, but who uses this information? For example: <q cite="http://www.example.com/quote"> <p>“A quote”</p> <footer>&#151;Person quoted</footer> </q> The source of the quoted text isn't visible to the end-user in a normal browser, so who does use this information, and how? Naeem Shaikh First, it's not only blockquote where you can use the cite attribute. You can use the cite attribute on the following elements also: <blockquote> <del> <ins> <q> Why would one use cite in above elements? To point to where the content is

What was the thinking behind the implementation of the dropdown menu in Twitter Bootstrap?

♀尐吖头ヾ 提交于 2019-12-02 23:39:10
I've been looking at Twitter's Bootstrap framework and I'm really impressed. However, I don't understand the thinking behind the way the dropdown navigation menu works. Firstly, in order to see child links, you have to click on the parent. I can see the benefits of this, but why not have the more traditional dropdown on hover approach as the default? Secondly, it seems that the thinking behind the Twitter Bootstrap's dropdown menu illuminates parent pages. I'm probably not explaining that very well... Say, you have a simple web page structure: Home About The Team Services Web Design Hosting

Is there any guide on “When to use display:block when :inline and when :inline-block” and why?

邮差的信 提交于 2019-12-02 17:48:16
Do you know any good article on "When to use display:block when :inline and when :inline-block " and why? and when we will have to override display:?? through css for any HTML tag/element? inline - Treats the element as though it were an inline chunk of text. width and height are meaningless block - Treats the element as as rectangle. width and height can be specified inline-block - Flows a element inline with the text, but allows width and height to be specified. Elements default to one of these anyway. For example: <span> , <em> , <strong> -> inline <div> , <p> -> block quirksmode.org has a

Which HTML5 tag should I use to mark up an author’s name?

浪子不回头ぞ 提交于 2019-12-02 14:20:50
For example of a blog-post or article. <article> <h1>header<h1> <time>09-02-2011</time> <author>John</author> My article.... </article> The author tag doesn't exist though... So what is the commonly used HTML5 tag for authors? Thanks. (If there isn't, shouldn't there be one?) HTML5 has an author link type : <a href="http://johnsplace.com" rel="author">John</a> The weakness here is that it needs to be on some sort of link, but if you have that there's a long discussion of alternatives here . If you don't have a link, then just use a class attribute, that's what it's for: <span class="author"

Unorthodox use of html5 nav tag

怎甘沉沦 提交于 2019-12-02 09:27:07
I have made "creative" use of the new html5 elements, sometimes pushing the intended boundaries a bit. Like most, my site is mainly made of articles comments and links to other articles. I decided that I'd use the article tag just once, so there's no confusion whatsoever. For comments, I'm using the aside element and I think that it fits the definition - it's related to the content but it can be done without. In the case of links to other articles (actually, titles with excerpts and taxonomy aids), I've decided to just use the nav, for lack of a better element, and I know that this is where it