(X.)H.T.M.L. Markup Code for the Form Help Method
The Context-Sensitive help markup starts on code line 5 and ends on code line 7 in the code block.
- Below is a (X.)H.T.M.L. code block (gray colored area) containing all of the markup needed to construct the form.
- An external cascading style sheet (master.css) positions the Context-Sensitive help icon on the right side of the h3 element instruction text for quick association and access to it.
- For your editing and reference purposes, this external C.S.S. style sheet is contained within the main project folder along with the rest of the working parts of this tutorial.
Definitions of the highlighted code in the code block:
- <a></a> This is the anchor (link) element which contains the following attributes and their values:
- rel="help" This markup attribute and its value act as the structural "hook" to the external DOM/JavaScript.
- href="HelpExample.htm" This markup attribute and its value identify the hyperlink path to the external Context-Sensitive help web page.
- <img - - - src="images/help_small.gif" This markup attribute and its value identify the source location of the external help icon image.
-
<form action="" method="post" id="enquiryform">
-
<fieldset>
-
<legend>Enquiry Form</legend>
-
<h3 title="help instructions">Click the icon to view help in a new window.
-
<a rel="help" href="HelpExample.htm"> -
<img alt="helpicon" title="Click to view help in a new window." -
width="16" height="16" src="images/help_small.gif"/></a> -
</h3>
-
<div>
-
<label for="subject" title="Subject dropdown list.">
-
Subject <span class="req"">Required</span></label><br />
-
<select name="subject" id="subject"
-
<option value="">Select a Subject</option>
-
<option value="Option 1">Help Authoring Tools</option>
-
<option value="Option 2">Microsoft HTML Help</option>
-
<option value="Option 3">Web-based Help</option>
-
<option value="Option 4">Context-Sensitive Help</option>
-
</select><br />
-
<label for="name" title="Name field">
-
Name <span class="req"">Required</span></label><br />
-
<input type="text" name="name" id="name" /><br />
-
<label for="email" title="Email field">
-
Email <span class="req"">Required</span></label><br />
-
<input type="text" name="email" id="email" /><br />
-
<label for="message" title="Message field">
-
Message <span class="req"">Required</span></label><br />
-
<textarea name="message" id="textarea" rows="6" cols="30"</textarea><br />
-
<label for="updates" title="Updates checkbox">
-
Send Me Updates <span class="req">Optional</span></label><br />
-
<input type="checkbox" name="updates" id="checkbox" value="n" />
-
</div>
-
<label for="submit" title="Click this button to submit your enquiry.">
-
<input class="submit" type="submit" id="submit" value="Submit Enquiry" /></label>
-
</fieldset>
-
</form>