Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`—` or `—` is there any difference in HTML output?

Tags:

html

ascii

— or —

Is there a difference between these? Is one better-supported than the other?

like image 573
Adam Ramadhan Avatar asked Nov 09 '10 12:11

Adam Ramadhan


People also ask

What backtick is use for?

The backtick ` is a typographical mark used mainly in computing. It is also known as backquote, grave, or grave accent. The character was designed for typewriters to add a grave accent to a (lower-case) base letter, by overtyping it atop that letter.

Why is it called a Backtick?

What Does Backtick Mean? A backtick in computer science represents a “shell” form of command structure that some call a “double operator.” Essentially, the use of backticks allows for evaluating a string as part of a general command. It may be used in computing languages like Perl or other types of code.


1 Answers

SGML parsers (or XML parsers in the case of XHTML) can handle — without having to process the DTD (which doesn't matter to browsers as they just slurp tag soup), while — is easier for humans to read and write in the source code.

Personally, I would stick to a literal em-dash and ensure that my character encoding settings were consistent.

like image 122
Quentin Avatar answered Sep 20 '22 09:09

Quentin