Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How have Html entities inside asp.net page?

Inside an asp.net page, should I use

<html><title>My page's title from México</title></html>

Or

<html><title>My page&rsquo;s title from M&eacute;xico</title></html>

Both examples have the same output. Since asp.net encodes all my pages to utf-8, there is no need to use html entities, is that right?

like image 490
jdecuyper Avatar asked Aug 12 '08 16:08

jdecuyper


People also ask

Can HTML code be used in ASP pages?

The ASP engine ignores the HTML code blocks.

How do you use character entities in HTML?

Character entities are used to display reserved characters in HTML. &#entity_number; To display a less than sign (<) we must write: &lt; or &#60; Advantage of using an entity name: An entity name is easy to remember.

What is &nbsp HTML?

A non-breaking space prevents line breaks from occurring at a particular point in an HTML document. To use a non-breaking space, you would use the following: &nbsp; For example, if you wanted the words "Mr."

What are HTML character entities?

An HTML entity is a piece of text ("string") that begins with an ampersand ( & ) and ends with a semicolon ( ; ). Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces).


1 Answers

The ASCII table is set of characters, arguable the first standardized set of characters back in the days when you could only spare 1 byte per character. http://asciitable.com/ But I did some looking around at the extended character set of ASCII and it appears that the character you are referencing is an ASCII character. So there really isn't a problem which ever way you choose to display your title.

My revised answer is go for less expensive one according to space (i.e. the first one)

like image 88
Nick Berardi Avatar answered Oct 03 '22 03:10

Nick Berardi