javascript - Automatic keyword highlighting in webpage -
javascript - Automatic keyword highlighting in webpage -
i trying figure out, how can create dom elements, illustration <div> can utilize special code placeholder. (not default <code> tag)
for example, utilize <div>'s (with class) , words in <div> like, keywords in programming language, alter color automatically - depending sort of keyword are; string, number, function etc.
here's example
that page has multiple <div>'s , keywords in them in special color.
how can create that?
well, it's straight-forward - fiddle.
the variations on theme infinite.
css
.bigred { font-size: 21px; color: red; } .littlegreen { font-size: 16px; color: green; } .blueitalic { fond-size: 18px; color: blue; font-style: italic; } javascript html css
Comments
Post a Comment