If you want to find more than just <title> or 'Welcome' you might want to look at using something like SAX (Simple API for XML).
SAX lets you parse pretty much any type of document, raising an event each time an element etc are encountered. I've used it the XML-like documents and can almost guarantee it will work with HTML. Can take a little while to learn to use (took me 2 hours to read the tutorial stuff and get my head around how to use it for what I wanted). A brief example from my code is below:
...
FReader := TSAXXMLReader.Create(nil);
FReader.Vendor := 'Keith Wood';
FReader.Options := FReader.Options + [soNamespaces];
FHandler := TSAXContentHandler.Create(nil);
FError := TSAXErrorHandler.Create(nil);
FReader.ContentHandler := FHandler;
FReader.ErrorHandler := FError;
FHandler.OnStartDocument := saxOnStartDocument;
FHandler.OnEndDocument := saxOnEndDocument;
FHandler.OnStartElement := saxOnStartElement;
FHandler.OnEndElement := saxOnEndElement;
FHandler.OnCharacters := saxOnCharacters;
FError.OnWarning := saxOnWarning;
FError.OnError := saxOnError;
FError.OnFatalError := saxOnFatal;
...
The saxOn... procedure declarations are:
procedure saxOnStartDocument(Sender: TObject);
procedure saxOnEndDocument(Sender: TObject);
procedure saxOnStartElement(Sender: TObject; const NamespaceURI, LocalName, QName: SAXString; const Atts: IAttributes);
procedure saxOnCharacters(Sender: TObject; const PCh: SAXString);
procedure saxOnEndElement(Sender: TObject; const NamespaceURI, LocalName, QName: SAXString);
procedure saxOnWarning(Sender: TObject; const Error: ISAXParseError);
procedure saxOnError(Sender: TObject; const Error: ISAXParseError);
procedure saxOnFatal(Sender: TObject; const Error: ISAXParseError);
as you can see, you can get to the element attributes in the OnStartElement event and the text in the OnCharacters event.....
anyway, I've included a link below: