Processing has a means to access the HTML text of a webpage:
- String html[] = loadStrings("http://www.processing.org");
- for( int i=0;i<html.length;i++){
- println( html[i] );
- }
To make a browser from scratch, you would have to "decode" that HTML yourself, and turn it into a visual representation of the webpage. That's basically what a browser does! Good luck writing your own one!
Some hints if you're really serious:
- Ignore things inside HTML comment tags ( <!-- --> ).
- Determining what is inside HTML tags ( < > ), and what is not. You can actually make a text-only webpage quite easily if you filter out the content from the style information.
- Start with the basic style tags, such as links, font colors, background colors, tables, lists, paragraphs... The list goes on and on...
- Work out how to do images.
- Work out how to deal with more complex tags, such as div's, classes, spans, etc...