Embed Code

In terms of high-level computer languages, to embed means to incorporate an essential aspect. That essential aspect, or object, is often alien and therefore, the programmer cannot simply combine the distinct parts. In order to allow these types of combinations, most languages offer a mechanism, or interface.

A coding standard is a set of guidelines and rules that establish qualities, often stylistic, for a programming language. Interfaces are often an important aspect of coding standards. In an abstract sense, a coding standing is itself an interface. It allows o­ne programmer to interface more easily with the code of another programmer. Some coding standards are specific to a development team, a community of developers, or even the language itself.

Web development is a scenario where object embedding plays a significant role. The reason for this is that the Internet is not standard. Programmers must use wide range of technologies. Moreover, people connect to the Internet using different types of computers, operating systems, and browsing software.

HTML provides interfaces that the programmer uses to embed objects. o­ne of the oldest mechanisms is the EMBED element. EMBED tags allowed the programmer to declare an object, which the visitor’s web browser would determine how to load and incorporate into the page. However, EMBED was never completely standardized and this presented some interesting challenges. The programmer could not rely o­n browser behavior. Some browsers would display the object as expected, others would do so erratically or with quirks, and others would just refuse outright.

HTML had a simpler, standard interface built in to the language, the script tags. This mechanism is what allows programmers to incorporate disparate web languages, such as PHP and JavaScript, into an HTML document. Programmers could also use it to embed complex objects like music and video, albeit not as easily. Nevertheless, this became the preferred method for a while due to its standardization. Today, there are other alternatives, the OBJECT element for instance.