Alex Steinberg
Alex Steinberg

Reputation: 1466

What’s the difference between 
 and 
?

Apart from readability, what is the difference between the HTML codes 
and 
?

Upvotes: 1

Views: 4436

Answers (1)

Joel
Joel

Reputation: 6173

ASCII Code 


HTML Entity 


Hexadecimal value 


These are all referring to the same thing but are represented in different ways. They all translate to Unicode U+0000A LINE FEED (LF)

Example:

The number 2 can be represented using 1+1. It can also be represented using |sqrt(4)|. The result is the same, but using different syntaxes we can achieve the same result in different ways.

References:

https://theasciicode.com.ar/ascii-control-characters/line-feed-ascii-code-10.html

https://www.quackit.com/character_sets/unicode/co_controls_and_basic_latin_unicode_character_codes.cfm

https://www.w3schools.com/html/html_symbols.asp

https://www.w3schools.com/charsets/ref_html_ascii.asp

Upvotes: 6

Related Questions