HTML – Basics 1


Mark-up Languages



HyperText Markup Language ( HTML )



Web Browser



HTML Files




HTML Extensions





XHTML Files

eXtensible Hypertext Markup Language

Introduced in late 1990s to help correct a number of problems with “standard” HTML.

Sometimes casually referred to as “HTML 5.0” but HTML really goes to v. 4.01.


Case Restrictions







Basic Constructs

Tags


<start tag>The text goes here.</end tag>


Empty Tags

<hr /> : draws a line across the document

<br /> : a line feed, or break




Basic Constructs -

All tags must be nested where: <p> … </p> contains a paragraph and <em> … </em> contains emphasized text,

Wrong: <p>This <em> overlap is not nested. </p> So it is wrong. Illegal… Bad… Defective. </em>

Correct: <p><em>This is proper nesting.</em> It is good!</p>





The Header (Head) Section



<head> : begin the head section

<title> : a descriptive title of document

</title>

<! --- >Optional items such as script here</>

</head> : head of the head section





The Body Section

<body>

{ main text of document goes here }

</body>



Basic HTML Document Structure



<html> { Markup Language Type Declaration }

<head>

<title> { Descriptive Text Here }

</title>

</head>

<body> { or, frameset }

{ Main Document Here }

</body> { or, /frameset }

</html>





Commonly Applied HTML Tags

Text Element Tags

<p> … </p> : Paragraph

<b> … </b> : Bold

<i> … </i> : Italics

<u> … </u> : Underline

<em> … </em> : Emphasize (logical – exact effect depends on browser)

<br /> : Line feed or break

<hr /> : Horizontal Rule (line)



Headings – Six (6) Levels

<h1> … </h1> Heading.

<h2> … </h2> Heading.

<h3> … </h3> Heading.

<blockquote> … </blockquote> : Indents block of text one tab.



Lists

<ol> Begin an Ordered List

<li> … </li> A list element

<li> … </li> Another list element

</ol> End of Ordered List

<ul> … </ul> As above, but Unordered List



HTML Document


<html>

<! This is a comment line: Browser will ignore it.>

<head>

<title> Sample HTML document </title>

</head>


<body>

<h3> This be a heading.</h3>

<p>This is a sentence in this sample document.</p>

<p>This is another sentence.</p>

<blockquote>

<ol>

<li> List item number one </li>

<li> List item number two </li>

<li> List item number three </li>

</ol>

</blockquote>

</body>

</html>




DOCTYPE



HTML Extensions









Create A Template For Your Use