[answered] What is semantic code?

I saw “understands the importance of semantic code” on a job posting and don’t know what that means. It was for a WordPress dev position too.

Semantics is the study of meaning, and semantic code is essentailly code that carries it’s own meaning. The best example i can give of this is using semantic HTML tags like <section> and <article> rather than just <div> becuase they carry more meaning as to their purpose. Semantic code can also go into a consistant class/ID naming system for HTML and CSS, descriptive function name for JavaScript, or just well organized, commented code. In short, when it says you should “understand the importance of semantic code” it’s saying you should have consistent, descriptive, and readable code.


Sounds like a bougie way of saying clean code. Calling it semantic code makes it sound like a altogether different type of language or method of writing code.

Thanks for the response.