Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

six HTML heading tags

heading                  ::=      h1_tag
                         |        h2_tag
                         |        h3_tag
                         |        h4_tag
                         |        h5_tag
                         |        h6_tag

The heading rule tells us that wherever the heading nonterminal appears in a rule, you can replace it with exactly one of the actual heading tags.

text-shadow

Shadows are another common feature of modern Web designs. Shadows add an
element of depth to a page, but they can also enhance readability (if used properly)
to lift a headline from the page. The text-shadow attribute was technically
part of CSS2, but it has only recently been supported by major browsers:
h2 {
font-size: 300%;
text-shadow: 3px 3px 5px #666666;
}

rel microformats

Remember the rel attribute from earlier? That attribute is often used in microformats,
and the usage is generally very simple. The rel-license format, for instance, looks like this:
<a rel="license" href="http://creativecommons.ca
/licenses/by-nc-sa/2.5/">
Creative Commons License</a>
By including a rel attribute with a value of license in the anchor tag, you can indicate
that the destination of the hyperlink is a license for the content contained on the current
page. The example I’m using is from my own design blog Unfortunately Paul, where the
content has been made available under a “Creative Commons Attribution-NonCommercial-
ShareAlike 2.5 License,” which means that people are free to copy, distribute, and display
my published entries and to make derivative works so long as I’m credited, it’s for nonprofit
purposes, and any derivations are released under the same license. Creative
Commons is an organization that provides a variety of “some rights reserved” copyright
licenses, allowing content authors to release their content into the wild but retain some
level of copyright.

Arrays and HTML

Arrays are great because they’re used to hold lists of data in your programming
language. Of course, HTML already has other ways of working with
lists. The <ul> and <ol> tags are both used for visual representations of
lists, and the <select> object is used to let the user choose from a list. It’s
very common to build these HTML structures from arrays.

Table basics in HTML

It’s reasonably straightforward to create a simple table when hand-coding markup. The
bare essentials of a single table is an opening <table> tag, followed by at least one table
row (a <tr>), followed by at least one table cell (a <td>, meaning “table data”). Here’s an
example:
<table>
<tr>
<td>Some data</td>
</tr>
</table>

That’s about as minimalist as you can get when it comes to creating tables, but you’re
unlikely to create a table with only one item of data, so let’s make things a touch more
interesting. The following markup is for a two-column table with four rows of data (the
presentational border attribute is just here as a visual aid to better distinguish the layout
of the table, and its effect should be replicated with CSS in a production environment):
<table border="1">
<tr>
<td>Name</td>
<td>Place of residence</td>
</tr>
<tr>
<td>Paul Haine</td>
<td>Oxford</td>
</tr>
<tr>
<td>Vikki Roberts</td>
<td>Bracknell</td>
</tr>
<tr>
<td>Leon Boardman</td>
<td>London</td>
</tr>
<tr>
<td>Emma Sax</td>
<td>Peaslake</td>
</tr>
</table>

Anatomy of an XHTML document

Finally, let’s look at how a strict XHTML 1.0 document is laid out:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Our title</title>
</head>
<body>
<p>Our content</p>
</body>
</html>
Let’s now go through this markup one line at a time.
Doctype declaration
First we see a doctype declaration. A doctype declaration provides an indication as to
what Document Type Definition (DTD) you’re going to be writing your markup to. A
DTD is basically a page detailing the rules and grammar of the markup. It can look a little
daunting, but let’s break it down and examine each piece. The doctype starts off like this:
<!DOCTYPE
Nothing much more to say here; this is just how a doctype begins. The root element of the
document that will appear after the doctype declaration—the <html> element—needs to
be specified immediately after the opening of the declaration:
<!DOCTYPE html
Note that we can use html or HTML, depending on the version of (X)HTML we’re writing to
and how we’re writing it. For all XHTML doctypes, the root element should be in lowercase,
but for HTML doctypes the root element may be uppercase if the rest of your tags
are written so.
Following that, we have the word PUBLIC:
<!DOCTYPE html PUBLIC
This indicates that the DTD we’re about to reference is publicly available. If the DTD was
private, then we would use SYSTEM instead (as in “a system resource,” probably a locally
held resource somewhere on your network).
Next we have the Formal Public Identifier (FPI), which describes details about both the DTD
and the organization behind the DTD.

XHTML vs. HTML

The question of whether to use XHTML or HTML will often not even come up in an average
web project; most web designers these days will naturally gravitate toward XHTML, as
it is perceived as being new, advanced, and the “X” makes it sound cool. The truth is,
XHTML isn’t as different from HTML as people think, and the purpose of this section of the
chapter is to discuss exactly how XHTML differs from earlier versions of HTML, debunk
some myths and misconceptions about XHTML and HTML, examine the issues behind
MIME types, and cover when it is (and isn’t) appropriate to use XHTML over HTML.

Differences between XHTML and HTML

There are several rules that apply to XHTML that do not apply to HTML. These are fairly
straightforward and you may know some (or all) of them already, but to reiterate:

The <html>, <head>, and <body> tags are all required in XHTML.

The <html> tag must have an xmlns attribute with a value of http://www.w3.org/
1999/xhtml.

All elements must be closed. I touched upon this earlier, but just remember that an
opening tag must have either an equal closing tag (if it’s a container tag) or a selfclosing
space-plus-slash.

All tags must be written in lowercase.

All attribute values must be quoted with either single quotes or double quotes.
Thus, class=page is invalid but class="page" and class='page' are both fine.

All attributes must have values. Some attributes, such as the selected attribute
used with the <option> tag, could be written in a shortened form in HTML—that is,
<option selected>data</option> would be valid. In XHTML, however, you must
write <option selected="selected">data</option>.

Ampersands should be encoded. That is, you should write &amp; instead of just &.
This is true wherever the ampersand is: in your content or in a URL.

id and class attributes

The id attribute is used to identify elements and mark up specific functional areas of a
website, and the class attribute is used to classify one or more elements. These important
attributes help you target elements when it comes to styling or scripting. I refer to both of
these attributes throughout the book, but for now all you need to know is that a specific
id attribute value can be used just once per page, whereas a class attribute value can be
used multiple times (the attributes themselves can be used multiple times per page). For

example, say you begin a document with this:
<body id="homepage">

You would then not be able to use an id attribute value of homepage anywhere else on the
same page. However, if you do this:
<body class="homepage">

then you are free to use the class attribute value of homepage as many times as you like
throughout the same page, but bear in mind that it still applies the same CSS, no matter
what tag you apply it to.

<div id="rightColumn">
<strong class="redText">
<p class="big">

Divs and spans

Divs and spans are two tags that, when used well, can help give your page a logical structure
and some extra hooks to apply any CSS or DOM scripting that you might need later. When
used badly, they can litter your document unnecessarily and make your markup, styling, and
scripting needlessly complicated.


<div id="header">
...
</div>
<div id="mainContent">
...
</div>
<div id="secondaryContent">
...
</div>
<div id="footer">
...
</div>

A span is used for marking out sections within a block element and sometimes inside
another inline element. It is an inline element, just the same as <em>, <strong>, or <a>,
except without any semantic meaning—it is simply a generic container. It can itself contain
further inline elements, including more spans. For example, say you wish to color the first
two words of a paragraph red, keeping the rest of the paragraph black. You can use a
<span> for this:
<p><span class="leadingWords">The first</span> two words of this å
paragraph can now be styled differently.</p>
A span cannot contain a block element—that is, you cannot place a <div> within a <span>
and expect it to work the way you want.

Character Entities

 Character Entities

The following table lists the defined standard and proposed character entities for HTML and XHTML, as well as several that are nonstandard but generally supported.
Entity names, if defined, appear for their respective characters and can be used in the character-entity sequence &name; to define any character for display by the browser. Otherwise, or alternatively for named characters, use the character's three-digit numeral value in the sequence &#nnn; to specially define a character entity. Actual characters, however, may or may not be displayed by the browser, depending on the computer platform and user-selected font for display.
Not all 256 characters in the International Organization for Standardization (ISO) character set appear in the table. Missing ones are not recognized by the browser as either named or numeric entities.
To be sure that your documents are fully compliant with the HTML 4.0 and XHTML 1.0 standards, use only those named character entities with no entries in the Conformance column. Characters with a value of "!!!" in the Conformance column are not formally defined by the standards; use them at your own risk.
Numeric entity
Named entity
Symbol
Description
Conformance
&#009;
Horizontal tab
&#010;
Line feed
&#013;
Carriage return
&#032;
Space
&#033;
!
Exclamation point
&#034;
&quot;
"
Quotation mark
&#035;
#
Hash mark
&#036;
$
Dollar sign
&#037;
%
Percent sign
&#038;
&amp;
&
Ampersand
&#039;
'
Apostrophe
&#040;
(
Left parenthesis
&#041;
)
Right parenthesis
&#042;
*
Asterisk
&#043;
+
Plus sign
&#044;
,
Comma
&#045;
-
Hyphen
&#046;
.
Period
&#047;
/
Slash
&#048;-&#057;
09
Digits 09
&#058;
:
Colon
&#059;
;
Semicolon
&#060;
&lt;
<
Less than sign
&#061;
=
Equals sign
&#062;
&gt;
>
Greater than sign
&#063;
?
Question mark
&#064;
@
Commercial at sign
&#065;-&#090;
A-Z
Letters A-Z
&#091;
[
Left square bracket
&#92;
\
Backslash
&#093;
]
Right square bracket
&#094;
Caret
&#095;
_
Underscore
&#096;
`
Grave accent
&#097;-&#122;
a-z
Letters a-z
&#123;
{
Left curly brace
&#124;
|
Vertical bar
&#125;
}
Right curly brace
&#126;
~
Tilde
&#130;
,
Low left single quote
!!!
&#131;
Florin
!!!
&#132;
"
Low left double quote
!!!
&#133;
...
Ellipsis
!!!
&#134;
Dagger
!!!
&#135;
Double dagger
!!!
&#136;
^
Circumflex
!!!
&#137;
Permil
!!!
&#138;
Capital S, caron
!!!
&#139;
<
Less than sign
!!!
&#140;
Œ
Capital OE ligature
!!!
&#142;
Capital Z, caron
!!!
&#145;
'
Left single quote
!!!
&#146;
'
Right single quote
!!!
&#147;
"
Left double quote
!!!
&#148;
"
Right double quote
!!!
&#149;
Bullet
!!!
&#150;
En dash
!!!
&#151;
Em dash
!!!
&#152;
~
Tilde
!!!
&#153;
Trademark
!!!
&#154;
Small s, caron
!!!
&#155;
>
Greater than sign
!!!
&#156;
œ
Small oe ligature
!!!
&#158;
Small z, caron
!!!
&#159;
Capital Y, umlaut
!!!
&#160;
&nbsp;
Nonbreaking space
&#161;
&iexcl;
¡
Inverted exclamation point
&#162;
&cent;
¢
Cent sign
&#163;
&pound;
£
Pound sign
&#164;
&curren;
¤
General currency sign
&#165;
&yen;
¥
Yen sign
&#166;
&brvbar;
Broken vertical bar
&#167;
&sect;
§
Section sign
&#168;
&uml;
¨
Umlaut
&#169;
&copy;
©
Copyright
&#170;
&ordf;
ª
Feminine ordinal
&#171;
&laquo;
«
Left angle quote
&#172;
&not;
¬
Not sign
&#173;
&shy;
­
Soft hyphen
&#174;
&reg;
®
Registered trademark
&#175;
&macr;
¯
Macron accent
&#176;
&deg;
°
Degree sign
&#177;
&plusmn;
±
Plus or minus
&#178;
&sup2;
2
Superscript 2
&#179;
&sup3;
3
Superscript 3
&#180;
&acute;
´
Acute accent
&#181;
&micro;
μ
Micro sign (Greek mu)
&#182;
&para;
Paragraph sign
&#183;
&middot;
·
Middle dot
&#184;
&cedil;
,
Cedilla
&#185;
&sup1;
1
Superscript 1
&#186;
&ordm;
º
Masculine ordinal
&#187;
&raquo;
»
Right angle quote
&#188;
&frac14;
¼
Fraction one-fourth
&#189;
&frac12;
½;
Fraction one-half
&#190;
&frac34;
¾
Fraction three-fourths
&#191;
&iquest;
¿
Inverted question mark
&#192;
&Agrave;
À
Capital A, grave accent
&#193;
&Aacute;
Á
Capital A, acute accent
&#194;
&Acirc;
Â
Capital A, circumflex accent
&#195;
&Atilde;
Ã
Capital A, tilde
&#196;
&Auml;
Ä
Capital A, umlaut
&#197;
&Aring;
Å
Capital A, ring
&#198;
&AElig;
Æ
Capital AE ligature
&#199;
&Ccedil;
Ç
Capital C, cedilla
&#200;
&Egrave;
È
Capital E, grave accent
&#201;
&Eacute;
É
Capital E, acute accent
&#202;
&Ecirc;
Ê
Capital E, circumflex accent
&#203;
&Euml;
Ë
Capital E, umlaut
&#204;
&Igrave;
Ì
Capital I, grave accent
&#205;
&Iacute;
í
Capital I, acute accent
&#206;
&Icirc;
Î
Capital I, circumflex accent
&#207;
&Iuml;
Ï
Capital I, umlaut
&#208;
&ETH;
Capital eth, Icelandic
&#209;
&Ntilde;
Ñ
Capital N, tilde
&#210;
&Ograve;
Ò
Capital O, grave accent
&#211;
&Oacute;
Ó
Capital O, acute accent
&#212;
&Ocirc;
Ô
Capital O, circumflex accent
&#213;
&Otilde;
Õ
Capital O, tilde
&#214;
&Ouml;
Ö
Capital O, umlaut
&#215;
&times;
x
Multiply sign
&#216;
&Oslash;
Ø
Capital O, slash
&#217;
&Ugrave;
Ù
Capital U, grave accent
&#218;
&Uacute;
Ú
Capital U, acute accent
&#219;
&Ucirc;
û
Capital U, circumflex accent
&#220;
&Uuml;
Ü
Capital U, umlaut
&#221;
&Yacute;
Ý
Capital Y, acute accent
&#222;
&THORN;
Capital thorn, Icelandic
&#223;
&szlig;
ß
Small sz ligature, German
&#224;
&agrave;
à
Small a, grave accent
&#225;
&aacute;
á
Small a, acute accent
&#226;
&acirc;
â
Small a, circumflex accent
&#227;
&atilde;
ã
Small a, tilde
&#228;
&auml;
ä
Small a, umlaut
&#229;
&aring;
å
Small a, ring
&#230;
&aelig;
æ
Small ae ligature
&#231;
&ccedil;
ç
Small c, cedilla
&#232;
&egrave;
è
Small e, grave accent
&#233;
&eacute;
é
Small e, acute accent
&#234;
&ecirc;
ê
Small e, circumflex accent
&#235;
&euml;
ë
Small e, umlaut
&#236;
&igrave;
ì
Small i, grave accent
&#237;
&iacute;
í
Small i, acute accent
&#238;
&icirc;
î
Small i, circumflex accent
&#239;
&iuml;
î
Small i, umlaut
&#240;
&eth;
Small eth, Icelandic
&#241;
&ntilde;
ñ
Small n, tilde
&#242;
&ograve;
ò
Small o, grave accent
&#243;
&oacute;
ó
Small o, acute accent
&#244;
&ocirc;
ô
Small o, circumflex accent
&#245;
&otilde;
õ
Small o, tilde
&#246;
&ouml;
ö
Small o, umlaut
&#247;
&divide;
÷
Division sign
&#248;
&oslash;
Small o, slash
&#249;
&ugrave;
ù
Small u, grave accent
&#250;
&uacute;
ú
Small u, acute accent
&#251;
&ucirc;
Û
Small u, circumflex accent
&#252;
&uuml;
ü
Small u, umlaut
&#253;
&yacute;
y
Small y, acute accent
&#254;
&thorn;
Small thorn, Icelandic
&#255;
&yuml;
ÿ
Small y, umlaut

Layers

Spacers and multiple columns are natural extensions to conventional HTML, existing within a document's normal flow. With version 4, Netscape took HTML into an entirely new dimension with layers. It transforms the single-element document model into one containing many layered elements that are combined to form the final document. Regrettably, layers are not supported by Netscape 6 or any version of Internet Explorer.
Layers supply the layout artist with a critical element missing in standard HTML: absolute positioning of content within the browser window. Layers let you define a self-contained unit of HTML content that can be positioned anywhere in the browser window, placed above or below other layers, and made to appear and disappear as you desire. Document layouts that were impossible with conventional HTML are trivial with layers.
If you think of your document as a sheet of paper, layers are like sheets of clear plastic placed on top of your document. For each layer, you define the content of the layer, its position relative to the base document, and the order in which it is placed on the document. Layers can be transparent or opaque, visible or hidden, providing an endless combination of layout options.

H.3.1. The <layer> Tag (Antiquated)

Each HTML document content layer is defined with the <layer> tag. A layer can be thought of as a miniature HTML document whose content is defined between the <layer> and </layer> tags. Alternatively, the content of the layer can be retrieved from another HTML document by using the src attribute with the <layer> tag.

<layer> (Antiquated)

Function
Defines a layer of content within a document
Attributes
above, background, below, bgcolor, class, clip, left, name, src, style, top, visibility, width, z-index
End tag
</layer>; never omitted
Contains
body_content
Used in
block

Regardless of its origin, Netscape 4 formats a layer's content exactly like a conventional document, except that the result is contained within that separate layer, apart from the rest of your document. You control the position and visibility of this layer using the attributes of the <layer> tag.
Layers can be nested, too. Nested layers move with the containing layer and are visible only if the containing layer itself is visible.

Multicolumn Layout

Multicolumn text formatting is one of the most common features of desktop publishing. In addition to creating attractive pages in a variety of formats, multiple columns let you present your text using shorter, easier-to-read lines. HTML page designers have longed for the ability to easily create multiple text columns in a single page, but they have been forced to use various tricks,
Netscape 4 neatly solved this problem with the unique <multicol> tag. While fancy unbalanced columns and straddling are not possible with this tag, as they are with tables, conventionally balanced text columns are easy to create with <multicol>. And while this capability is available only with Netscape 4, the <multicol> tag degrades nicely in other browsers.

H.2.1. The <multicol> Tag (Antiquated)

The <multicol> tag creates multiple columns of text and lets you control the size and number of columns.

<multicol> (Antiquated)

Function
Formats text with multiple columns
Attributes
class, cols, gutter, style, width
End tag
</multicol>; never omitted
Contains
body_content
Used in
block

The <multicol> tag can contain any other HTML content, much like the <div> tag. All of the content within the <multicol> tag is displayed just like conventional content, except that Netscape 4 places the contents into multiple columns rather than just one.
The <multicol> tag creates a break in the text flow and inserts a blank line before rendering its content into multiple columns. After the tag, another blank line is added and the text flow resumes using the previous layout and formatting.
Netscape 4 automatically balances the columns, making each approximately the same length. Where possible, the browser moves text between columns to accomplish the balancing. In some cases, the columns cannot be balanced perfectly because of embedded images, tables, or other large elements.
You can nest <multicol> tags, embedding one set of columns within another set of columns. While infinite nesting is supported, more than two levels of nesting are generally impractical and results in unattractive text flows.

HTML Paragraph

HTML Paragraph

Paragraphs are defined with the <p> tag.

<p>This is a paragraph</p>
<p>This is another paragraph</p>


HTML '<p>' tag example

<html>
<head><title>Example on the use of Paragraphs in HTML</title></head>
<body>

<p>This is my first paragraph.<br/>
It describes how to use HTML.</p>

HTML Headings

Headings are defined with the <h1> to <h6> tags.
<h1> defines the largest heading. <h6> defines the smallest heading.
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
 

Headings Are Important

Use the HTML heading tags for headings only. Don't use headings to make something BIG or bold.
Search engines use your headings to index the structure and content of your web pages.
Since users may skim your pages by its headings, it is important to use headings to show the document structure.
H1 headings should be used as main headings, followed by H2 headings, and less important H3 headings, and so on.

HTML Comments

Comments can be inserted in the HTML code to make it more readable and understandable. Comments are ignored by the browser and not displayed.
Comments are written like this:
<!-- This is a comment -->

 

 


 

HTML Examples


HTML headings are defined with the <h1> to <h6> tags.

<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>


HTML Paragraphs

HTML paragraphs are defined with the <p> tag.

<p>This is a paragraph</p>
<p>This is another paragraph</p>


HTML Links

HTML links are defined with the <a> tag.

<a href="http://www.demo.com">This is a link</a>

Note: The <a> tag contains an attribute (href) to provide the link address.


HTML Images

HTML images are defined with the <img> tag.

<img src="img.gif" width="166" height="80" />

Note: The name of the image and the size are provided as attributes.

HTML Extension

HTM or HTML Extension?

When you save an HTML file, you can use either the .htm or the .html extension. We use .htm in our examples. It is a habit from the past, when the software only allowed three letters in file extensions.
With new software it is perfectly safe to use .html.

use a plain text editor (like Notepad) to edit HTML

HTML Intro

What is HTML?

HTML is a language for describing web pages.

    HTML stands for Hyper Text Markup Language
    HTML is not a programming language, it is a markup language
    A markup language is a set of markup tags
    HTML uses markup tags to describe web pages

HTML Tags

HTML markup tags are usually called HTML tags

    HTML tags are keywords surrounded by angle brackets like <html>
    HTML tags normally come in pairs like <b> and </b>
    The first tag in a pair is the start tag, the second tag is the end tag

    Start and end tags are also called opening tags and closing tags.

HTML Documents - Web Pages

    HTML documents describe web pages
    HTML documents contain HTML tags and plain text
    HTML documents are also called web pages

The purpose of a web browsers (like Internet Explorer) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:

<html>
<body>
<h1>Heading</h1>
<p>paragraph</p>
</body>
</html>
 

Example Explained

  • The text between <html> and </html> describes the web page
  • The text between <body> and </body> is the visible page content
  • The text between <h1> and </h1> is displayed as a heading
  • The text between <p> and </p> is displayed as a paragraph
 

HTML Tags

HTML stands for Hyper Text Markup Language
HTML language, called tags, are words or acronyms surrounded by brackets. A typical HTML tag looks like this:

<tag>  Example Of An HTML Tag </tag>
There are four tags every HTML document should have. These tags define the what type of document it is, and the major sections-<HTML>, <HEAD>, <TITLE>,<BODY>. 

<HTML>

<HEAD>
<TITLE>Name Of Basic Document</TITLE>
</HEAD>

<BODY>
The content of the document
</BODY>

</HTML>

The <html> element is also known as the root element.
HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags, known as empty elements, are unpaired, for example <img>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tags, comments and other types of text-based content.

The purpose of a web browser is to read HTML documents and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page.

HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML webpages.

Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup

The <html> tag is supported in all major browsers.

web development

An important part of developing a successful web development strategy is deciding on how you're going to make money.

Ordinary people are making extraordinary money working from home on the Internet. And, you have the opportunity to do just that.

If you're looking for a great opportunity to work at home and earn a substantial income, selecting affiliate programs that pay generous commissions for top quality products that are in high demand is key. However, locating quality affiliate programs can be very difficult.

HTML-language of the web

The HTML code tag is used for indicating a piece of code. The code tag surrounds the code being marked up.For example, the title element represents the title of the document..There are multiple kinds of HTML elements: void elements, raw text elements, and normal elements.


    a start tag (<tag>) marking the beginning of an element, which may incorporate any number of attributes;
    some amount of text content, but no elements (all tags, apart from the applicable end tag, will be interpreted as content);
    an end tag, in which the element name is prepended with a forward slash: </tag>. In some versions of HTML, the end tag is optional for some elements. The end tag is required in XHTML.[examples needed]

Normal elements usually have both a start tag and an end tag, although for some elements the end tag, or both tags, can be omitted. It is constructed in a similar way:

    a start tag (<tag>) marking the beginning of an element, which may incorporate any number of attributes;
    some amount of content, including text and other elements;
    an end tag, in which the element name is prepended with a forward slash: </tag>.

Learn HTML with this free HTML tutorial - build tables, forms, fonts, color, images, hyperlinks and more.