Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 286
Nick Avatar asked Aug 17 '12 16:08

Nick


People also ask

How do you write X bar in HTML?

For whichever character you want to put bars above, add ̄ after it. So for example if you want x double bar (x̄̄) the HTML code is x̄̄ . If you want to make an x triple bar (x̄̄̄) then write x̄̄̄ . This also works for any character.

How do I type math symbols in HTML?

Many mathematical, technical, and currency symbols, are not present on a normal keyboard. To add such symbols to an HTML page, you can use the entity name or the entity number (a decimal or a hexadecimal reference) for the symbol.


2 Answers

×

  • 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.

like image 85
unor Avatar answered Oct 20 '22 01:10

unor


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.

like image 29
Jukka K. Korpela Avatar answered Oct 20 '22 00:10

Jukka K. Korpela