Page Elements & Attributes

Introduction

Page Elements & Attributes are generally stored in the <head> element of a web page, the contents of the elements generally affect the whole page, and not just one element. Elements in the <head> element are generally JavaScript and CSS imports, which are required for styles and third-party JavaScript libraries. Other elements include <meta> elements which are used to describe advanced behaviour to the web browser and also contain simple information such as the author of the web page.

Working with Page Elements & Attributes

To work with Page Elements & Attributes, click the Page button on the toolbar of the Page Editor window.



You can now start to change, add, and delete Page Elements. The list of elements allows you to drag and drop to re-order the elements, although you should be careful while doing this as some JavaScript libraries can be particular about in the order in which they are loaded.


Meta tags

Meta tags can contain many different types of data, some are purely information, such as the author of the web page, or a description of it's content. You can add a new Meta tag from the popup menu, and refer to the following pages for more information:

http://en.wikipedia.org/wiki/Meta_tag

http://w3schools.com/tags/tag_meta.asp

http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4.2

Link tags

Link tags in the Head element define a link to an external resource, generally this means an external CSS stylesheet file. You can have as many link tags as you like, and also define different links for different types of web browser, for example

<link rel="stylesheet" media="screen" type="text/css" href="theme.css" />

defines a stylesheet which will be used by desktop web browsers, however on a handheld device, these styles may be too complex or high-bandwidth to be useful, so another link can be added like so:

<link rel="stylesheet" media="handheld" type="text/css" href="handheldtheme.css" />

which will be read by the web browser on a handheld computer instead, and you, the author can ensure that the styles are more appropriate for this kind of device.

You can read more about <link> elements here:

http://www.w3schools.com/TAGS/tag_link.asp

Title tag

The title tag simply contains a title for the web page, this will normally appear in the title bar of your web browser.

Script tags

Scripts tags contain either JavaScript code, or the URLs of files contain JavaScript code. Including these in the <head> element ensures that they are loaded right away by the web browser, before any JavaScript makes calls to methods or functions with the linked JavaScript file. It is generally advisable to have JavaScript in separate files so that it can be re-used in many HTML files.

You can choose any JavaScript file in your project from the popup menu to add to the <head> element, or type them in manually if you prefer. You should not that certain JavaScripts need to be linked in a particular order to work.