Tutorial: Using the 'html-page.wl' Definition
Logo WebLord v2.2
The Document Assembly Tool

Tutorial: The html-page.wl Definition

For building HTML pages, the html-page.wl definition is one of the most useful that you can #include and use. It provides an entire framework for building the...

	<!doctype ...>
	<html>
		<head>
		...
		</head>
	
		<body ...>
		...
		</body>
	</html>

... page framework, by inheriting information for the META tags, attributes for the BODY tag, etc. This tutorial section demonstrates how to use this highly useful definition effectively to ensure that your pages easily conform to a minimally complete structure.

The examples below assume that your file contains the following to make it functional, in addition to the specifics of each example:

	#include "html-page.wl"
	SITE foo
	{
		pages = P1;
	}

Minimal use

Let's build a simple page:

	page P1
	{
		value = header
			"Hello world!"
			footer;
	}

This will produce the following output page (we've made the "Hello world!" text red for you to see just how much work was done by WebLord:

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
	<html>
	
	<head>
	<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
	<meta name=Generator content="WebLord 2.2">
	</head>
	
	<body>
	<!--
	        This page was constructed with
	        WebLord 2.2 for Linux
	        Copyright © 1997,1998,1999 Udo K. Schuermann
	        All rights reserved
	
	        WWW: http://RingLord.com/products/weblord/
	-->
	Hello world!
	</body>
	</html>

Intermediate use

Let's actually do something more useful with that page object by adding some properties that the header object uses, such as meta data properties and page style properties:

	page P1
	{
		value = header
			"Hello world!"
			footer;

		title		= "The Hello World page";
		author		= "Me, myself, and I";
		keywords	= "hello world, weblord test, nifty example";

		bgcolor		= "#ffffff";
		textcolor	= "#444444";
		linkcolor	= "#880000";
		vlinkcolor	= "#440000";
		alinkcolor	= "#888800";
	}

This now produces

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
	<html>
	
	<head>
	<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
	<meta name=Generator content="WebLord 2.2">
	<meta name=keywords content="hello world, weblord test, nifty example">
	<meta name=author content="Me, myself, and I">
	<title>The Hello World page</title>
	</head>
	
	<body bgcolor="#ffffff" text="#444444" link="#880000" vlink="#440000"
		alink="#888800">
	<!--
	        This page was constructed with
	        WebLord 2.2 for Linux
	        Copyright © 1997,1998,1999 Udo K. Schuermann
	        All rights reserved
	
	        WWW: http://RingLord.com/products/weblord/
	-->
	Hello world!
	</body>
	</html>

As you can see the simple additions for title, author, keywords, as well as various colors for page elements have been cleverly applied to produce a nicer looking page. The meta tags in particular will help search engines properly index the page.

If you were to have put these style properties into the (global) SITE object, these would then apply to all pages on your site that did not override them with specific values of their own.


This material is Copyright © 1997,1998,1999,2000,2001 RingLord Technologies and Udo Schuermann. All rights reserved. The latest versions of the WebLord software and (this) documentation can be obtained from the WebLord Home Page (the link will only function if you are connected to the internet.)