Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>First, the way I understand it, it's more appropriate to use numeric entities in an XHTML document, such as <code>&amp;#034;</code> instead of <code>&amp;quot;</code>, is that right?</p> </blockquote> <p><a href="http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters" rel="nofollow noreferrer"><code>&amp;quot;</code> is also defined for XHTML.</a> So you can use both.</p> <blockquote> <p>Second, for my RSS XML feed, which entity type is correct? Named or numeric? I believe it's numeric, but see examples of both in my searches.</p> </blockquote> <p>Again, <a href="http://www.w3.org/TR/xml/#sec-predefined-ent" rel="nofollow noreferrer"><code>&amp;quot;</code> is also defined for XML.</a> So you can use both.</p> <blockquote> <p>Third, which of the following is correct for entities inside inline JavaScript?</p> </blockquote> <p>The second one is correct since a plain <code>&lt;</code> is not allowed inside an attribute value declaration (but <code>&gt;</code> is).</p> <hr> <p><strong>Edit</strong>    Now that you refined your question:</p> <p>I would use a charset that contains all characters I need. So if you want to be able to use almost any character, use Unicode and encode the characters with UTF-8.</p> <p>Thereby you can encode any character with UTF-8 directly and have no need to use character references for characters other than the special characters of XML (at least <code>&amp;</code>, <code>&gt;</code>, <code>"</code> and <code>'</code>).</p> <p>And here you have the free choice between the named or numeric character references. Use what you like better or what your programming language uses/prefers.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload