basics of html. tags for overall page structure:,, and tags for titles, headings, and paragraphs:,...

10
Basics of HTML

Upload: amos-cross

Post on 19-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

Basics of HTML

Page 2: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

• Tags for overall page structure: <html>, <head>, and <body>

• Tags for titles, headings, and paragraphs: <title>, <h1> through <h6>, and <p>

• Tags for comments: <!--...-->

• Tags for lists: <ol>, <ul>, <li>, <dt>, and <dd>

Page 3: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

Structuring Your HTML

• The DOCTYPE Identifier : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd">

• Strict ,Transitional, Frameset

• <html> <head>

</head> <body> </body>

</html>

Page 4: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

• Title: <title>The Lion, The Witch, and the Wardrobe</title>

• Heading: <h1>Examples</h1> • <H1> to <h6>

• Paragraphs : <p>..</p>• <b>..</b>, <i>..</i>,<u>…</u>,• <s> strikethrough• <tt>Monospaced typewriter font• <PRE>…</pre>

Page 5: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

Special characters• Char Code Description• & &amp; Ampersand• < &lt; Less than• > &gt; Greater than• © &copy; Copyright• ® &reg; Registered trademark• ± &plusmin; Plus or minus• 2 &sup2; Superscript 2• 3 &sup3; Superscript 3• ´ &acute; Acute accent• ` &#96; Grave accent• # &#35; Number• % &#37; Percent• &nbsp; white space

Page 6: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

Meta tag

• Searching: • <meta name="author" contents="your name" />

• Refresh :• <meta http-equiv="refresh" content="time in

seconds, URL of the new page" />

• Expires: • <meta http-equiv="expires" contents="Wed, 04

December 2006 00:00:00 GMT" />

Page 7: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

List and List

• HTML 4.01 defines these three types of lists:– Numbered or ordered lists, which are typically

labeled with numbers– Bulleted or unordered lists, which are typically

labeled with bullets or some other symbol– Glossary lists, in which each item in the list

has a term and a definition for that term, arranged so that the term is somehow highlighted or drawn out from the text

Page 8: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

• Attributes are extra parts of HTML tags that contain options or other information about the tag itself

• <ul><li></li></ul>• <ul type="disc">

• “disc”,”square”,”circle”

• <ol><li></li></ol>• <ol type="I" start="7">

• Type= “1”,”a”,”A”,”i”,”I”• <li type="1">January</li> • <li value="10">Eggs</li>

Page 9: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

• <ol style="list-style-type: square"> </ol> • <ul style="list-style-image: url(/bullet.gif)">

<li>Example</li> </ul> • <ul style="list-style-position: inside">

<li>Example</li> </ul>

• white-space: Specifies how white space is handled for list items. Valid values are pre, nowrap, and normal.

Page 10: Basics of HTML. Tags for overall page structure:,, and Tags for titles, headings, and paragraphs:, through, and Tags for comments: Tags for lists:,,,,

Glossary

• <dl>

<dt>Basil</dt>

<dd>Annual. Can grow four feet high; the scent of its tiny white flowers is heavenly

</dd>

</dl>

• Comment :<!-- This is a comment -->