What is the proper HTML entity for the "x" in a dimension?

HtmlCharacterHtml EntitiesSemantic MarkupTypography

Html Problem Overview


Is the proper HTML entity for giving dimensions ×? I want to be semantically correct, but that begs the question, is listing a dimension as 2" x 3" even semantic? If the x represents "by", would I use the letter x or ×?

In my code I've been using 2″ × 3″, or 2″ × 3″. The non-breaking spaces are to prevent the dimension from being wrapped, as per the suggestions found in The Elements of Typographic Style Applied to the Web.

Html Solutions


Solution 1 - Html

×

  • Unicode: U+00D7 MULTIPLICATION SIGN
  • HTML: ×, ×
  • CSS: \00d7

See the Wikipedia article about the multiplication sign:

> In mathematics, the symbol × (read as times or multiplied by) is primarily used to denote the […] > > - Geometric dimension of an object, such as noting that a room is 10×12 feet in area.


Depending on the context, the math element (for MathML) element could be of use.

Solution 2 - Html

The proper question is which character should be used. The use of entity references for characters adds no semantics. There is no formal standard on denoting dimensions, but clearly this is about multiplication rather than the Latin letter x, so “x” (×) is the correct character.

In practice, this is more of an orthography and typography question than about “semantic web”. Search engines, browsers, etc., don’t really care; it’s the human readers that matter.

Solution 3 - Html

You're doing everything correctly. I believe × here is [semantically] related to the operation of multiplication, i.e. in fact you write the area by specifying two dimensions.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNickView Question on Stackoverflow
Solution 1 - HtmlunorView Answer on Stackoverflow
Solution 2 - HtmlJukka K. KorpelaView Answer on Stackoverflow
Solution 3 - HtmlKryzhovnikView Answer on Stackoverflow