html-heading

HTML heading elements in labels [closed]

孤街醉人 提交于 2019-12-13 22:18:12
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . When I need place a title, I use h-number tags. But in case that I need a title in a label , for instance, should I use h-number , too? Example: <label ...> <h1>Username</h1> <input ... /> </label> 回答1: There is no need to do so. Just use styles label, label span {font-size:

How to make the headline (H1 with lines on the sides) with CSS only

梦想与她 提交于 2019-12-13 00:56:55
问题 I have made some a fiddle of such a headline that I need. CSS: body { background:url("http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/tiny_grid.png"); } .main-container { width: 600px; margin: 0 auto; box-shadow:0 0 5px #d00; } .headline { display: inline-block; margin: 40px 0; padding: 0 30px; font: normal 33px/1.1 Georgia, "Times New Roman", Times, serif; color: #3E3E3E; height: 1px; border-left: 300px solid #aaa; border-right: 300px solid #aaa; white-space: nowrap; } .headline

Keep heading (h1, h2…) from going full width on line break

十年热恋 提交于 2019-12-12 19:45:26
问题 I have headings that have display:inline-block set, but one of them is really long and takes two lines. The issue is that when it breaks to the second line, it automatically makes it take the whole width of the parent container (even though it has plenty of space around it, and it is set to inline-block). Anyone knows how to prevent this? Also, I can't really use a solution that only applies to this one if it will break other headings, because the same code is generating other 9 non-line

Showing <h1> <h5> text inline using css

牧云@^-^@ 提交于 2019-12-12 10:48:56
问题 I want to show "Sentiment analysis" such that S should be much larger then h5 text. What's wrong with follwing code: HTML: <h1>S</h1> <h5>entiment Analysis</h5> CSS: h1 { margin-left: 36%; color:#C0C0C0; font-family: "calibri"; text-decoration:underline; white-space: pre; } h5 { margin-left: 36%; color:#C0C0C0; font-family: "calibri"; text-decoration:underline; white-space: pre; } Live code in CodePan 回答1: That's a messy code. If you just want to make the first letter Bigger, You can try the

H2 heading numbering doesn't work correctly with paginated posts

主宰稳场 提交于 2019-12-12 03:40:00
问题 I'm using jQuery script from jQuery automatic heading numbering for H2 subtitle counting. I just updated the script little bit: var h2Elements = $('article').find('h2'); var h2ElemCount = h2Elements.length; $(h2Elements).each(function(i) { $(this).prepend(h2ElemCount - i + '. '); }); it works perfectly if the article is showed in the single page. When I paginate the post (because there are 10 to 15 subtitles) the counting starts from 1 for each subpage in article. How to keep the heading

jQuery automatic heading numbering

99封情书 提交于 2019-12-11 05:53:48
问题 I have articles on website with 10-15 H2 tag subtitles. Something likes that. <h1>Name of article</h1> <h2>Subtitle</h2> <p>.....</p> <h2>Subtitle</h2> <p>.....</p> <h2>Subtitle</h2> <p>.....</p> <h2>Subtitle</h2> <p>.....</p> So, question is how to give number for each H2 tag (subtitle) automatically by jQuery in descending order? <h1>Name of article</h1> <h2>15.Subtitle</h2> <p>.....</p> <h2>14.Subtitle</h2> <p>.....</p> <h2>13.Subtitle</h2> <p>.....</p> <h2>12.Subtitle</h2> <p>.....</p> I

Header in semantic HTML5

◇◆丶佛笑我妖孽 提交于 2019-12-11 03:39:17
问题 I am designing a semantic mark-up of my HTML page. The page consists of a main content block and of a side bar. There are several independent blocks in the side bar like latest news, links, statistics e.t.c. Each block has a header with a block name: "Statistics", "Links" e.t.c. The question. Is it a semanticly correct usage of the tag header if I put a block name in the header tag like <section id="News"><header>News</header><ul>...</ul></section> . Is it a semanticly correct to put the name

Best practice when displaying inline HTML elements next to a h1 element?

只愿长相守 提交于 2019-12-10 13:01:14
问题 I have a webpage that displays the name of a "product", with edit/delete links next to it on the same line. Example: Product 1 (Edit | Delete) I want the product name to have a large font size, and the edit/delete buttons to have regular font size (i.e. same as paragraphs and whatnot). And I want them to appear inline, like the example above. I'm just wondering what HTML/CSS I should utilise in order to achieve this. If I use a h1 element for the product name, it pushes the edit/delete links

How to target headings for a specific div ID?

岁酱吖の 提交于 2019-12-08 19:20:59
问题 I am trying to style all the headings in my header with a different font-family than the headings on the rest of the page but I am having trouble getting the style to only apply to the specific header ID. Here is what I tried: #header h1,h2,h3,h4 { font-family:'Helvetica'; } But this causes all h1/2/3/4 tags to use the Helvetica font regardless of if they are in the header div or not. I'm sure I am missing something simple, can anyone help? Thanks! 回答1: I think you must do so: #header h1,

Difference between heading inside section or before it in HTML5

孤人 提交于 2019-12-08 07:14:55
问题 In HTML5, what is the difference between a section with a h eading as child element and a section which is the next sibling of a h eading element? Does the same difference hold for div elements instead of section ? <section> <h1>First section</h1> <!-- other content --> </section> <!-- vs. --> <h1>Second section</h1> <section> <!-- other content --> </section> 回答1: The answers will highly depend upon logical view. <section> <h1>....</h1> </section> On the above case <h1> denotes the heading