The following code does not work:
literalNews.Text = "<img id='Image3' src='~/images/news_li.gif' alt=' ' height='20' width='20' />";
Assuming that your context is a page you need to resolve ~/ as it is a .net construct, it enables code to be used at different levels of a website.
Try
string src = Page.ResolveUrl("~/images/news_li.gif");
literalNews.Text = string.Format("<img id='Image3' src='{0}' alt=' ' height='20' width='20' />", src);
Your other option is to use a root relative path
literalNews.Text = "<img id='Image3' src='/images/news_li.gif' alt=' ' height='20' width='20' />";
<a id='img' src='[path]'></a>. Thats it!'~/images/etcneeds to have the path resolved.