musgravejw / html-parser

1 stars 1 forks source link

Create subset HTML parser #1

Open musgravejw opened 7 years ago

domfarolino commented 7 years ago

So basically as per IRC conversations, we want to create a parser that works for a rather strict subset of HTML elements. We should try and decide what elements we'll want to include. We can make this an incredibly basic list and keep expanding on it as we go I think. And it doesn't have to follow the standard perfectly if that makes our job easier (said no real browser vendor ever, actually...well...not true lol).

I think this is a good idea because I don't know anything about parsing and it would be fun to build this! I'm going to find a basic tutorial on parsing and then we can figure out how to go from there. Below is a list of HTML elements I have in mind:

Since this browser is going to be super basic we shouldn't worry about styles or a CSS equivalent thing at all probably. This is more of a concern for the graphics stuff, but it links in here a little bit because we don't want to add elements whose default UA styles are too complex for us to implement in the graphics stack. For example, it might make sense to only include block elements until we can flesh out more of our graphics work and add easy support for inlining elements, vertical and horizontal aligning, and things like inline styles maybe.