{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs40 HTML Introduction\fs20\par \par \par \b What is HTML?\b0\par \par \ul HTML is a markup language for describing web documents (web pages).\ulnone\par HTML stands for Hyper Text Markup Language\par A markup language is a set of markup tags\par HTML documents are described by HTML tags\par Each HTML tag describes different document content\par \par \par \i\par \par \ul A Small HTML Document\ulnone\par Example\par \par \par
\parMy first paragraph.
\par \par \par \par \par \ul\i0\par Example Explained\ulnone\par The declaration defines this document to be HTML5\par The text between and describes an HTML document\par The text between and provides information about the document\par The text betweenand
describes a paragraph\par \par \i Using this description, a web browser will display a document with a heading and a paragraph.\par \par \par \par \par \par \ul\i0 HTML Tags\ulnone\par HTML tags are keywords (tag names) surrounded by angle brackets:\parand
\par The first tag in a pair is the start tag, the second tag is the end tag\par The end tag is written like the start tag, but with a forward slash inserted before the tag name\par \par \par \par \par \ul The Declaration\ulnone\par The declaration represents the document type, and helps the browser to display a web page correctly.\par \par It must only appear once, at the top of the page (before any HTML tags).\par \par There are different document types. To display a web page correctly, the browser must know both type and version.\par \par The doctype declaration is not case sensitive. All cases are acceptable:\par \par \par \par _______________________________________________________________________\par \par \par \par \fs40 Write HTML Using Notepad or TextEdit\fs20\par \par Web pages can be created and modified by using professional HTML editors. However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac). We believe using a simple text editor is a good way to learn HTML.\par \par \par \par Follow the four steps below to create your first web page with Notepad or TextEdit.\par \par \ul Step 1: Open Notepad (PC)\ulnone\par Open Notepad in Windows 8 or later:\par Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.\par Open Notepad in Windows 7 or earlier:\par Click Start (bottom left on your screen). Click All Programs. Click Accessories. Click Notepad.\par \par \ul Step 1: Open TextEdit (Mac)\ulnone\par Open TextEdit.\par Please be sure that the text editor is set to plain text. Go to: Preferences > New Document > select plain text.\par Also make sure both "Display html file as html code" and "Display RTF file as RTF code" options are checked under "Open and Save".\par Then open a new document to place the code.\par \par \par \par \ul Step 2: Write Some HTML\ulnone\par Write or copy some HTML into Notepad.\par \par \par \par \parMy first paragraph.
\par \par \par Notepad\par \par \par \par \ul Step 3: Save the HTML Page\ulnone\par Save the file on your computer. Select File > Save as in the Notepad menu.\par Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).\par View in Browser\par You can use either .htm or .html as file extension. There is no difference, it is up to you.\par \par \par \par \ul Step 4: View the HTML Page in Your Browser\ulnone\par Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").\par The result will look much like this:\par View in Browser\par \par \par \par _______________________________________________________________________\par \par \par \par \fs40 HTML Basic Examples\fs20\par \par \par Don't worry if these examples use tags you have not learned.\par \par \par \ul HTML Documents\ulnone\par All HTML documents must start with a document type declaration: .\par The HTML document itself begins with and ends with .\par The visible part of the HTML document is between and .\par \par Example\par \par \par \par \parMy first paragraph.
\par \par \par \par \par \par \par \ul HTML Headings\ulnone\par HTML headings are defined with thetag:\par \ulnone\par Example\par
This is a paragraph.
\parThis is another paragraph.
\par \par \par \ul HTML Links\ulnone\par HTML links are defined with the tag:\par \par Example\par This is a link\par \par The link's destination is specified in the href attribute. \par Attributes are used to provide additional information about HTML elements.\par \par \par \par \par \ul HTML Images\ulnone\par HTML images are defined with the tag.\par The source file (src), alternative text (alt), and size (width and height) are provided as attributes:\par \par Example\par \par \par \par \par _______________________________________________________________________\par \par \par \par \fs40 HTML Elements\fs20\par \par \par \ul HTML Elements\ulnone\par An HTML element usually consists of a start tag and end tag, with the content inserted in between:\parMy first paragraph.
\par \par Start tag \tab Element content \tab End tag\par\tab My first paragraph. \tab
\parMy first paragraph.
\par \par \par \par Example Explained\par The element defines the whole document.\par \par It has a start tag and an end tag .\par \par The element content is another HTML element (the element).\par \par \parMy first paragraph.
\par \par \par \par The element defines the document body.\par It has a start tag and an end tag .\par \par The element content is two other HTML elements ().\par
\parMy first paragraph.
\par \par \par Theelement defines a paragraph.\par It has a start tag
and an end tag
.\par \par The element content is: My first paragraph.\parMy first paragraph.
\par \par \par \par \ul Do Not Forget the End Tag\par \ulnone Some HTML elements will display correctly, even if you forget the end tag:\par Example\par \par \parThis is a paragraph\par
This is a paragraph\par
\par
\par
\par
The example above works in all browsers, because the closing tag is considered optional.\par
Never rely on this. It might produce unexpected results and/or errors if you forget the end tag.\par
\par
\par
\par
\ul Empty HTML Elements\ulnone\par
HTML elements with no content are called empty elements.\par
is an empty element without a closing tag (the
tag defines a line break).\par
\par
Empty elements can be "closed" in the opening tag like this:
.\par
HTML5 does not require empty elements to be closed. But if you want stricter validation, or if you need to make your document readable by XML parsers, you must close all HTML elements properly.\par
\par
Use Lowercase Tags\par
HTML tags are not case sensitive:
means the same as
.\par The HTML5 standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML.\par \par \par \par \par }