Most blog owners would like to be able to show excerpts or previews of their articles as HTML. This allows the excerpt to be styled similarly to the post's landing page, providing a seamless transition for the reader from excerpt to full article.
Here is an example of how to create an HTML excerpt using PHP's DOMDocument class, where $html represents the entire article, and $num_chars the lower bound to the number of characters in the excerpt.
Note that this function returns a valid HTML preview of your blog's articles. I've used it as an answer on stackoverflow.