Lesson Two: TEXT MARKUP using HTML

Dynamic HTML

Dynamic HTML refers to the creation of web pages using a combination of HTML, style sheets, and scripting. The style sheets discussed on this site will be Cascading Style Sheets. The scripting will use JavaScript as the language.

The basic structure of an HTML tag is <tag attribute = "value"> </tag> although some tags do not have a closer.

Every HTML page has certain features that are necessary. These are the tags <html>, <head>, and <body>. They define the structure of the page.

The rest of the tags for this lesson involve alterations in how the text is displayed. Below is a list of the tags introduced in this lesson


Required tags for all pages:
<html>
<head>
<body>

Usable in head or body
<! >

Tags found in Head section
<title> </title>
<meta name = "keywords" content = " ">
<meta name = "description" content =" ">
<style> </style> (See below)
<script language = JavaScript> </script> (Covered later in quarter)

Attributes found in body tag itself
<body bgcolor = " " text = " " link = " " vlink = " ">

Tags found in body section
<b> </b>
<blockquote> </blockquote>
<br />
<center> </center>
<font attributes> </font> (attributes color, size)e.g. <font color = "blue"> <font size = "+1"> <font color = "2a3d5e" size = "-1">
Headers <h1> </h1> through <h6> </h6>
<hr /> and with attributes of width, size (pixels, default = 2), and align; e.g <hr width = "30%" /> <hr align = "right /> <hr size = "7" />
<i> </i>
<p> </p>
<pre> </pre>
<sub> </sub>
<sup> </sup>

Cascading style sheet

In head portion:
<style> <!-- Style definitions here --> </style>
Style definitions:
span.class {attributes} e.g. span.lgred {color:red; font-size:20pt}
tag.class {attributes} e.g. b.orrt {color:orange; text-align: right}
Possible attributes:
color (named or hex); font-size (in points); font-family (named font); text-align (left, right, center, justify); text-indent (inches or cm); margin-left also right, top, bottom (in, cm, pixels)

Since the style sheet elements have been set in the head portion, you can now use them anywhere you wish in the body:
<span class = "lgred">This text would be displayed in red with font-size 20pt</span>
<b class = "orrt">This text would be bold with the additional features of orange color and right aligned</b>


Lesson 3

Return to main page