|
Posted by Benjamin Niemann on 11/23/46 11:43
Jo wrote:
> Hello evryone...
> i jus need to know whether font tag in HTML does not require a </font>
> tag.
> Me parsing out text from web page source code. I have to remove the
> entire tag
> <font >
> Any text
> </font>
>
> So i will read from <font> till I encounter a </font>
> It works fine..But i recently saw that certain webpages dont have
> closing </font> tag for all <font>
> Is it not necessary to put a </font> tag??
The end tag is mandatory. If it is missing, then the webpage is invalid.
> What do i do now?
If you have to deal with invalid document, then you will either have to
implement some pretty complex heuristics to get a result that works similar
to how webbrowsers deal with these pages.
Or you first pipe the document through a tool like HTML Tidy
(http://www.w3.org/People/Raggett/tidy/) before you process it yourself.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Navigation:
[Reply to this message]
|