MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/13xih8g/html_is_not_a_programming_language/jmiy69v/?context=3
r/ProgrammerHumor • u/huxx__ • Jun 01 '23
500 comments sorted by
View all comments
1
For traditional reasons let's continue to distinguish between markup and programming.
But let's not be snobbish and act like html is entirely different and can't handle any logic at all.
SrcSet is a good example.
SrcSet in html is basically declarative programming with a set of conditions that are equivalent to:
"if window width < 500 then img.src=small.jpg; else if window.width < 800 then img.src=big.jpg; else img.src=biggest.jpg;".
So don't treat HTML as unworthy. In some cases HTML alone can solve complex tasks
View all comments
1
u/SillAndDill Jun 01 '23 edited Jun 02 '23
For traditional reasons let's continue to distinguish between markup and programming.
But let's not be snobbish and act like html is entirely different and can't handle any logic at all.
SrcSet is a good example.
SrcSet in html is basically declarative programming with a set of conditions that are equivalent to:
"if window width < 500 then img.src=small.jpg; else if window.width < 800 then img.src=big.jpg; else img.src=biggest.jpg;".
So don't treat HTML as unworthy. In some cases HTML alone can solve complex tasks