SPHPlayground API
SPHPlayground
sphplayground sphplayground

Meta Data and JavaScript

This section illustrates implementations an usage of HTML meta elements and Client Side Scripting components.

HTML metadata

The <head> is implemented by the Head class. The <head> contains information such as the page <title>, links to external resources, and other metadata (data that describes the document).

The following list describe HTML meta data components:

Meta data can be described also in a PHP array or an YAML file. SPHPlayground is capable to transform this data to an HTML head component,

The Open Graph protocol

The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.

Client-side scripting using JavaScript containers

Client-Side JavaScript is JavaScript code that runs directly in a user’s web browser rather than on a server. It’s what makes web pages interactive, dynamic, and responsive to user actions.

Script interface defines an HTML element for client-side scripting, usually JavaScript.

NOTE!: The best practice of placing client side scripts is usually the end of the page, just inside the closing body tag. This guarantees that all of the DOM elements needed are already present on the page.

Foo User View: