top | item 13687220

(no title)

mamadrood | 9 years ago

Then what would be the difference between <h level=1> and <h1> ? Or is that sarcasm ?

discuss

order

tyingq|9 years ago

Because you can manipulate attributes without destroying and recreating elements. Changing <h level=1> to <h level=2> is a much simpler and different thing to changing <h1> to <h2>.

An alternative approach to 100% trusting the browser to calculate the level. You can calculate and adjust as needed.

esrauch|9 years ago

Can you explain in what ways it is simpler to change 1 to 2 in the first case? Is it that you are mutating them via script and it seems more "normal" to mutate a property of a tag instead of the tagname?

Or is it because it might have a named closing tag and you have to update both?