1 |
<?xml version="1.0" encoding="iso-8859-1"?> |
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
4 |
<head> |
5 |
<!-- template designed by Marco Von Ballmoos --> |
6 |
<title>HTMLagClass</title> |
7 |
<link rel="stylesheet" href="../media/stylesheet.css" /> |
8 |
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> |
9 |
</head> |
10 |
<body> |
11 |
<div class="page-body"> |
12 |
|
13 |
<table class="tutorial-nav-box"> |
14 |
<tr> |
15 |
<td style="width: 30%"> |
16 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Previous</a> |
17 |
</td> |
18 |
<td style="text-align: center"> |
19 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Up</a> |
20 |
</td> |
21 |
<td style="text-align: right; width: 30%"> |
22 |
<a href="../phpHtmlLib/tutorial_phpHtmlLib.pkg.html" class="nav-button">Next</a> |
23 |
</td> |
24 |
</tr> |
25 |
<tr> |
26 |
<td style="width: 30%"> |
27 |
<span class="detail">XMLTagClass</span> |
28 |
</td> |
29 |
<td style="text-align: center"> |
30 |
<span class="detail">XMLTagClass</span> |
31 |
</td> |
32 |
<td style="text-align: right; width: 30%"> |
33 |
<span class="detail">phpHtmlLib Guide</span> |
34 |
</td> |
35 |
</tr> |
36 |
</table> |
37 |
|
38 |
<div><a name=""></a><div class="ref-title-box"><h1 class="ref-title">HTMLagClass</h1> |
39 |
<h2 class="ref-purpose">This is the base HTML Tag class.</h2></div> |
40 |
<div class="ref-synopsis"><span class="author">by Walter A. Boring IV |
41 |
<div class="author-blurb"><a href="mailto:waboring@3gstech.com">mailto:waboring@3gstech.com</a></div></span> |
42 |
<div class="notes">March 2004, Walter A. Boring IV</div> |
43 |
<div class="release-info">(phpHtmlLib 2.4.x)</div></div> |
44 |
|
45 |
<span><a name="description"></a><h2 class="title">Description</h2><p>This class is a child of the <a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html">XMLTagClass</a>. It has all of the functionality for building all of the various |
46 |
HTML tags in either HTML mode or XHTML mode. Each HTML tag has specific attributes that make it unique, and this class |
47 |
provides the framework for all of those features. Each actual HTML tag is a child of this class that specifies the specific |
48 |
attributes and quirks for itself.</p> |
49 |
<p>Each W3C supported HTML tag is specified as a child of the HTMLTagClass in the phpHtmlLib tag_classes/ALLTAGS.inc file. |
50 |
You should look there to see the particulars on how each supported HTML tag is different from one another.</p></span> |
51 |
|
52 |
<span><a name="constructor"></a><h2 class="title">Creating an HTML tag object.</h2><p><p>Since each W3C supported HTML tag is already defined as a child of the HTMLTagClass, we just |
53 |
create the specific tag object that we are interested in.</p> |
54 |
<p>Each HTML Tag that phpHtmlLib supports is a class that is defined as follows: |
55 |
{TAGNAME}tag(). So if you want an img tag the class name is |
56 |
IMGtag. Lets look at an example for an anchor tag.</p> |
57 |
<pre class="example"><pre> |
58 |
$a = new Atag( array('href'" => "http://phphtmllib.newsblob.com"), |
59 |
'phpHtmlLib website'); |
60 |
print $a->render();</pre></pre></p> |
61 |
|
62 |
<p>Output: |
63 |
<pre class="example"><pre><a href="http://phphtmllib.newsblob.com">phpHtmlLib website</a></pre></pre></p></span> |
64 |
|
65 |
<span><a name="helper"></a><h2 class="title">Creating a HTML tag object with a helper function.</h2><p><p>Each HTML tag also has a 'helper' function defined to help build the tag |
66 |
with parameters that are for the most common attributes/values for each specific tag. |
67 |
The function name is always in the format of |
68 |
html_{tagname}(). So an anchor tag function would be as follows.</p> |
69 |
<pre class="example"><pre>$a = html_a("http://phphtmllib.newsblob.com", 'phpHtmlLib website'); |
70 |
print $a->render();</pre></pre></p> |
71 |
|
72 |
<p>Output: |
73 |
<pre class="example"><pre><a href="http://phphtmllib.newsblob.com">phpHtmlLib website</a></pre></pre></p></span></div> |
74 |
|
75 |
<table class="tutorial-nav-box"> |
76 |
<tr> |
77 |
<td style="width: 30%"> |
78 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Previous</a> |
79 |
</td> |
80 |
<td style="text-align: center"> |
81 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Up</a> |
82 |
</td> |
83 |
<td style="text-align: right; width: 30%"> |
84 |
<a href="../phpHtmlLib/tutorial_phpHtmlLib.pkg.html" class="nav-button">Next</a> |
85 |
</td> |
86 |
</tr> |
87 |
<tr> |
88 |
<td style="width: 30%"> |
89 |
<span class="detail">XMLTagClass</span> |
90 |
</td> |
91 |
<td style="text-align: center"> |
92 |
<span class="detail">XMLTagClass</span> |
93 |
</td> |
94 |
<td style="text-align: right; width: 30%"> |
95 |
<span class="detail">phpHtmlLib Guide</span> |
96 |
</td> |
97 |
</tr> |
98 |
</table> |
99 |
|
100 |
<p class="notes" id="credit"> |
101 |
Documentation generated on Thu, 1 Apr 2004 09:37:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC2</a> |
102 |
</p> |
103 |
</div></body> |
104 |
</html> |