element syntax is:
<tagName *[attributeName="value"]> element body </tagName>Attributes typically define colors, positions, links, ids, relationships, and event-handlers. An example is:
<p style="color: AntiqueWhite">some paragraph text here</p>Only a few of the most common tags have been shown here. The DevGuru site has a nice reference for all of the tags defined for HTML 4.0
element syntax is:
selector { property: value }Attributes typically define colors, positions, and fonts. The following example indents all paragraphs on the page:
p { margin-left: 10%; margin-right: 10%; }To style a single element we define a class:
.indent { margin-left: 10%; margin-right: 10%; }and apply it to any specific tag:
<p class="indent">some paragraph text</p>The w3shools website has a lot of useful tutorial and reference material on DTHML and specifically on CSS.
<script type=text/javascript">Script is used to respond to events on the page. These could be mouse position, mouse button clicks, keystrokes, or events related to page loading and unloading. This page illustrates the use of a JavaScript function to handle mouse button clicks when the mouse is positioned over a specific span element we call a patch. Please click on the light rectangle below./* some script code here */</script>
click meTwo things are required to create the behavior you just witnessed.
Note: you will have to unload the page by clicking prev and then coming back to this page in order to view the source. The reason for this is that only one popup window can exist at any given time, and we create one when we click the patch.Both w3shools and DevGuru provide tutorials and excellent reference materials on scripting and the use of JavaScript.
The w3schools website has a lot of tutorial and reference material on DHTML as well as many example applications.