public String build() throws HTMLFormatException {
		if (this.title.isEmpty()) {
			throw new HTMLFormatException("HTML title cannot be empty.");
		}
		StringBuilder out = new StringBuilder();
		out.ln("<!DOCTYPE html>");
		out.ln("<html>");
		out.startBlock();
		{
			out.ln("<head>");
			out.startBlock();
			{
				out.ln("<title>" + this.title + "</title>");
				if (!this.styles.isEmpty()) {
					out.ln("<style type=\"text/css\">");
					out.startBlock();
					{
						for (CSSStyle s : this.styles) {
							out.ln(s.build());
						}
					}
					out.closeBlock();
					out.ln("</style>");
				}
				if (!this.scripts.isEmpty()) {
					out.ln("<script>");
					out.startBlock();
					{
						for (JSScript s : this.scripts) {
							out.ln(s.build());
						}
					}
					out.closeBlock();
					out.ln("</script>");
				}
			}
			out.closeBlock();
			out.ln("</head>");
			out.ln("<body>");
			out.startBlock();
			{
				if (!this.objects.isEmpty()) {
					for (HTMLObject<?> o : this.objects) {
						out.ln(o.build());
					}
				}
			}
			out.closeBlock();
			out.ln("</body>");
		}
		out.closeBlock();
		out.ln("</html>");
		return out.toString();
	}