Jump to content

"<font></font>" HTML tag in ".json" data file.


Recommended Posts

Attention: W3Schools.com forum members:

     The following ".json" data file is used in conjunction with an AJAX ( Asynchronous Javascript And XML ) file to print a Bible verse to my web page:

{"book": "Deuteronomy", "chapter": "4", "verse": "<p><sup><b>20</b></sup>&#8202But the L<font size="2">ORD</font> has taken you and <sup><i>c</i></sup>&#8202brought you out of the iron furnace,<br> out of &#8201Egypt, <sup><i>d</i></sup>&#8202to be a people of his own inheritance, as you are this day.</p>"}

The string "L<font size='2'>ORD</font>" prevents my ".json" data file from being printed to my web page.  Why are the other hypertext markup language ( HTML ) tags accepted, but not the "<font></font>" HTML tag?  Is there a solution for this problem?  Thank you ( see Colossians 3:15, for example ) for your help and your patience. 🙂   Keep in touch.

Sincerely in Christ,

Russell E. Willis

P.S. - Please read Proverbs 23:23.

Edited by Rewillis
Link to comment
Share on other sites

The problem is the quote marks in size="2" which are ending your JSON string, you need to escape them with backslashes or replace them with single-quotes.

Unrelated, the <font> tag is deprecated and should not be used.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...