Semantic HTML
Back in the early days of the web, designers employed a lot of hacks to make web pages render correctly across various browsers. The most widely used trick was "slicing" images in Photoshop and laying the pieces out in data tables. Another trick was using the <br> break tag to create vertical spacing, or using the <center> tag to center-align elements. There were plenty more but, needless to say, a lot of bad habits were formed and it has taken over 10 years to eradicate the improper use of HTML tags.
Things are so much better compare to years ago when we just started writing HTML pages. The first is the adoption of web standards by most professional web developers. The other is that modern browser developers like Google (Chrome), Mozilla (Firefox), and Apple (Safari) all work together with the World Wide Web Consortium to ensure their respective browsers render the latest standards correctly. Another reason is mobile design and the need for web pages that download quickly over slower cellular networks. Stuffing 30 table cells with tiny jpegs makes the server work very hard. Each small image is a transaction and the transaction time, coupled with the size of the image, and the speed of the graphics engine rendering the page can make for lengthy downloads and a poor user experience.
When HTML tags are used to properly represent an element, it is called Semantic HTML. It is more of a best practice than an actual technology. Semantic code contains no design or styling elements. It is crucial to use Semantic HTML for Search Engine Optimization (SEO), accessibility, and lighter code. Semantics are the implied meaning of a subject. Why use semantic tags when we write our code? Humans have to work with machines. We write code ( a language that computers can understand ) to help computers understanding what we want, what we mean. The computers don't care about the meaning of your code, they simply interpret the code, and do what you told them to do. ( So when your code doesn't work, it is certain that it is something you are doing wrong, don't blame the computers). There are so many debates why we bother to write semantic tags. Divya Manian wrote an article while back (2011) titled "Our Pointless Pursuit Of Semantic Value", she argued that the benefits of using semantic tags are not worth all the trouble. But we have to work with other human. Taking the time to write semantic code helps our fellow human who might have to check your code, and collaborate with you often to be able to decipher your code quickly. I am saying, don't over do it, but spend some time to understand the meaning of these semantic tags. If you use them appropriately it will indeed save time. 1. for you, when you have to revisit your code two moths later; 2. for me, when I have to check your code at midnight before midterm, because you panic and dial my skype number; 3. for people who want to learn from you, for people who want to or have to collaborate with you. Most important thing to remember is that these semantic tags provide us more understanding of the structure of your page, not just the meaning of your page. It also helps the machines to quick processing your page. |