Question: I would like display for example this html code: 

```
<body>
    <p><b>Hello World</b></p>
    <p>This is a test of the URL <a href="http://www.example.com"> Example</a></p>
    <p><b>This text is bold</b></p>
    <p><em>This text is emphasized</em></p>
    <p><code>This is computer output</code></p>
    <p>This is<sub> subscript</sub> and <sup>superscript</sup></p>
</body>

```

I want to display it on a Dialog by declaring html in resources `strings.xml`. How can I do it?

Answer: 
The best way to add html source code in strings.xml is to use `<![CDATA[html source code]]>`. Here is an example:

```
<string name="html"><![CDATA[<p>Text</p>]]></string> 

```

Then you can display this html in TextView using:

```
myTextView.setText(Html.fromHtml(getString(R.string.html)));

```

If you have links in your html and you want them to be clickable, use this method:

```
myTextView.setMovementMethod(LinkMovementMethod.getInstance());

```
This Worked for me :

```
<?xml version="1.0" encoding="utf-8"?>

```

```
<string name="app_name">Sangamner College</string>
<string name="about_desc"><![CDATA[In order to make higher education available in the rural environment such as of Sangamner, Shikshan Prasarak Sanstha was established in 1960. Sangamner College was established by Shikshan Prasarak Sanstha, Sangamner on 23rd January 1961 on the auspicious occasion of Birth Anniversary of Netaji Subhashchandra Bose.The Arts and Commerce courses were commenced in June 1961 and in June 1965 Science courses were introduced. When Sangamner College was founded forty years ago, in 1961, there was no college available to the rural youth of this region. <br><br></>The college was founded with the aim of upliftment of the disadvantageous rural youth in all respects. On one hand, we are aware of the social circumstances prevailing in the rural area where we are working. So, we offer the elective option to students, which are favourable to the local atmosphere. On the other hand, we want to academically empower the aspiring youth by offering vocational course in Computer Applications to students of Arts &amp; Commerce. B.B.A., B.C.A. and M.C.A. courses were started with the same purpose. “Think globally, act locally” is our guiding Principle.]]></string>

```