# HTML/JSX Code Guidelines ## Craftsmanship Writing great HTML is a craft. - Another developer should be able to read the html and have a clear picture of what everything is and their relationship, without scratching their head. - Another developer should be able to learn how a section works, and not have to relearn everything when they go to a different one. Consistency. - Another developer should be able to read a given class on an element and tell where in the structure it falls (sensible prefixes) and whether it's content represents a single entity or a list of entities. - The naming of markup and classes should be semantic and style-agnostic. For the most part, avoid references to position or visuals, (`-left`, `-right`, `-dark`, `-blue`, etc). When writing a section of html make sure you can take a single element in isolation and be able to tell what its content will be. Always represent the nature of the content in the most clear, direct way possible. Bad: ```html Page Title ``` The example above provides a meaning with the class that is not matched with the text content. The `-link` part of the classname is redundant on an anchor, the `-blue` part is a style concern and should be specified in CSS only. Better: ```html