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: 
String.xml can contains HTML entities, like so:

```
<resources>
    <string name="hello_world">&lt;span&gt;</string>
</resources>

```

In your code: `getResources().getString(R.string.hello_world);` will evaluate to `"<span>"`. You can use this HTML formatted text like this:

```
TextView helloWorld = (TextView)findViewById(R.id.hello_world);
helloWorld.setText(Html.fromHtml(getString(R.string.hello_world)));

```
All the styling supported by the XML resources system is explained in the Android documentation.

[String Resources: Formatting and Styling](http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling)

Anything included there can be used and set directly on `TextView`. If you need to use further HTML markup, you will need to place raw HTML (with escaped characters for `&lt;`, `&gt;` and such) into the resource and load the entire thing in a `WebView`.