Internet is a huge source of information. Search engines have indexed much of this information and are able to extract the relevant webpages that are related to a given query. However, once the search engine retrieves a set of webpages, the user has to read the webpages in order to find the relevant information. This task is a time consuming task because webpages often mix information related to different subjects, and also because they usually contain advertisements and publicity that tries to call to attention the reader using pictures, videos, etc. In this work we define a novel technique for information filtering of webpages that allows us to automatically filter out the unwanted content of a webpage. This technique uses the distance of elements in a webpage to approximate semantic relations. The technique is able to work online (with any webpage that has not been pre-processes in advance). We present our implementation and show the usefulness of the technique with examples.