<div style="width: 800px; margin: 1em auto; font: bold 1em/1.2 Verdana, Arial, Helvetica, sans-serif"> <div style="float: left; width: 400px; padding: 1em 2em; font-size: 0.9em"> <span id="get-shit" onclick="callSomeFunction()">News</span> </div> </div>
What Is So Bad With It?
Except for not being very pretty code, and hard to get a good overview of it, there are some real disadvantages to this:
- HTML file size
- Your HTML code will weigh more, i.e. a web page riddled with similar code will have a kb size that is a lot larger than necessary.
- Lack of caching
- Poor accessibility
- Difficult code maintenance
- When it comes to making changes to the code, I’m sure every web developer would agree on that having code in just one centralized location is a lot more preferable than changing exactly the same kind of code snippets spread all over the files in the web site. Maintaining similar code to the above for an entire web site would be hell.
- Company proxy servers filtering out code (for example, read An important lesson learned about AJAX and accessibility).