semantic-markup

valign vs text-align in HTML

别来无恙 提交于 2020-08-24 06:08:17
问题 I can't figure out the difference between valign vs text-align in HTML in context with the following code: <table width="500" border="0"> <tr> <td colspan="2" style="background-color:#FFA500;"> <h1>Main Title of Web Page</h1> </td> </tr> <tr valign="top"> <td style="background-color:#FFD700;width:100px;text-align:top;"> <b>Menu</b><br /> HTML<br /> CSS<br /> JavaScript </td> <td style="background-color:#EEEEEE;height:200px;width:400px;text-align:top;"> Content goes here</td> </tr> <tr> <td

Semantic value of span

会有一股神秘感。 提交于 2020-06-24 11:21:39
问题 The span element seems to be exactly like a div, but at the in-line level rather than at the block level. However, I can't seem to think of any beneficial logical divisions that the span element can provide. A single sentence, or word if not contained in a sentence, seems to be the smallest logical part. Ignoring CSS, since CSS is only for layout and not for semantic meaning, when does span provide additional semantic value by chopping up a sentence or string of words ? It seems that in all

Semantic value of span

我与影子孤独终老i 提交于 2020-06-24 11:21:33
问题 The span element seems to be exactly like a div, but at the in-line level rather than at the block level. However, I can't seem to think of any beneficial logical divisions that the span element can provide. A single sentence, or word if not contained in a sentence, seems to be the smallest logical part. Ignoring CSS, since CSS is only for layout and not for semantic meaning, when does span provide additional semantic value by chopping up a sentence or string of words ? It seems that in all

How to semantically code an HTML nested table that aligns (and associates) with its parent table's headers

烈酒焚心 提交于 2020-04-05 15:41:07
问题 Edit: The selected answer contains a link to the working fiddle I was able to compose without the use of a nested table. I want to semantically code a table in HTML with a layout like the picture below. Unfortunately I haven't been able to find anything quite like it here on the network. I have been able to force the look by manually setting cell widths, but I want to make sure the code I'm producing makes sense, and I don't think that's the case, because without manually setting the widths,

HTML5 tags and microdata for a list of apartments

∥☆過路亽.° 提交于 2020-01-24 18:22:30
问题 which HTML5 tags and microdata schema should I use to describe a list of apartments to rent? They have the following properties: Name Image Unique number Location Description Price My HTML structure is currently like this: <section id="featured"> <h2>Featured appartaments</h2> <ul> <li> <article> <h3><a href="javascript:void(0);">House #1</a></h3> <img src="http://placehold.it/250x150/" alt="House #1" /> <p>Ref. 40</p> <p>My location</p> <p>My description.</p> <p>Price: € 500.000,00</p> <

HTML 5 Document Outlining Algorithm

佐手、 提交于 2020-01-11 03:26:04
问题 I am building a new site and I have recently started looking at the Document Outlining Algorithm. It states that all sections should have a header, sections include section , nav , article and body (There are probably some more too). So, I have a couple of navigation areas and my question is; would it be wise to have a heading but just hide it from the browser? 回答1: Every sectioning content element "longs" for a heading element ( h1 - h6 ). But you are not required to provide one. If you don

Scaling an image with a div, whose child sets the height

故事扮演 提交于 2020-01-10 03:25:17
问题 A div, by itself, is the height of it's contents. I want a div to include two children: another div (or image that is left aligned) and an unordered list (ul). The inner div (or image) will match the height of the parent div, the parent div height will conform to the height of the list (which can contain any reasonable number of items). I am unsure how to set the height of the parent div to match that of the list and have the inner div match the height of the outer div. Done properly through

Defining inner section on HTML5 markup

柔情痞子 提交于 2020-01-07 03:06:47
问题 A question about HTML5 markup. Which is correct? <header class="wrapper"> <div class="wrapper-inner"> </div> </header> -OR- <div class="wrapper"> <header class="wrapper-inner"> </header> </div> .wrapper { width: 100%; } .wrapper-inner { width: 980px; margin: 0 auto; } 回答1: Either is correct. If you want to use as a sectioning element for the page, then, you likely want: <header class="page-header"> <div class="page-header-subsection"> </div> </header> If you want to use as a sectioning

Defining inner section on HTML5 markup

本小妞迷上赌 提交于 2020-01-07 03:06:13
问题 A question about HTML5 markup. Which is correct? <header class="wrapper"> <div class="wrapper-inner"> </div> </header> -OR- <div class="wrapper"> <header class="wrapper-inner"> </header> </div> .wrapper { width: 100%; } .wrapper-inner { width: 980px; margin: 0 auto; } 回答1: Either is correct. If you want to use as a sectioning element for the page, then, you likely want: <header class="page-header"> <div class="page-header-subsection"> </div> </header> If you want to use as a sectioning