You are on page 1of 22

HTML

INTRODUCTION
HTML stands for Hyper Text Markup Language
predominant markup language for web pages Developed by World Wide Web Consortium & WHATWG

Type of format Markup language

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 tags are not case sensitive

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

HTML paragraphs are defined with the <p> tag.


HTML Links HTML links are defined with the <a> tag. HTML Images HTML images are defined with the <img> tag. HTML Comments Comments can be inserted in the HTML code to make it more readable and understandable but they are ignored by the browser and are not displayed.

HTML Element
An HTML element starts with a start tag / opening tag and ends with an end tag / closing tag
The element content is everything between the start and the end tag Some HTML elements have empty content . Eg.line break

Empty elements are closed in the start tag


Most HTML elements can have attributes

HTML Attributes
Attributes provide additional information about the element
Attributes are always specified in the start tag

Attributes come in name/value pairs like: name="value"


HTML links are defined with the <a> tag. Eg. <a href="http://www.w3schools.com">This is a link</a>

HTML Styles
Styles was introduced to style HTML elements using the style attribute, or indirectly in separate style sheets (CSS) Style Examples:
I. Background Color

II.Font Family, Color and Size


III.Text Alignment

HTML Links
Link syntax:
<a href="url">Link text</a> A hyperlink is an address to a resource on the web. An anchor is a term used to define a hyperlink destination inside a document. The HTML anchor element <a>, is used to define both hyperlinks and anchors.

HTML Images
In HTML, images are defined with the <img> tag.
To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image The syntax of defining an image: <img src="url" /> The browser puts the image where the image tag occurs in the document. The alt attribute is used to define an "alternate text" for an image. The "alt" attribute gives information of what is missing on a page if the browser can't load images.

HTML Tables
Tables are defined with the <table> tag. A table is divided into rows (with <tr> tag), and each row is divided into data cells (with <td> tag) where td stands for "table data," which is the content of a data cell.
Headings in a Table Headings in a table are defined with the <th> tag.

HTML Lists
Unordered Lists
An unordered list is a list of items marked with bullets. An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

<ul> <li>Coffee</li> </ul> Coffee

Ordered Lists An ordered list is also a list of items marked with numbers.

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
<ol> <li>Coffee</li> </ol>

1.Coffee

Definition Lists A definition list is not a list of single items. It is a list of items with a description of each item. A definition list starts with a <dl> tag (definition list).

Each term starts with a <dt> tag (definition term).


Each description starts with a <dd> tag (definition description). <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> </dl> Coffee
Black hot drink

HTML Forms and Input


A form is an area that can contain form elements that allow the user to enter information (like text fields, textarea fields,radio buttons, checkboxes) in a form. A form is defined with the <form> tag.
The most used form tag is the <input> tag. When the user clicks on the "Submit" button, the content of the form is sent to the server.

HTML Colors
HTML colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values. The lowest value to the light sources is 0 and highest value is 255.
Hex values are written as 3 double digit numbers, starting with a # sign. It gives a total of more than 16 million different colors to play with (256 x 256 x 256).

HTML Frames
With frames, we can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.
The <frameset> tag defines how to divide the window into frames The <frame> tag defines what HTML document to put into each frame

The disadvantages of using frames are:


I. The web developer must keep track of more HTML documents II. It is difficult to print the entire page

TAG
<!--...--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area /> <b> <base /> <basefont /> <bdo> <big> <blockquote> <body>

DESCRIPTION
Defines a comment Defines the document type Defines an anchor Defines an abbreviation Defines an acronym Defines contact information for the author/owner of a document Deprecated. Defines an embedded applet Defines an area inside an image-map Defines bold text Defines a default address or a default target for all links on a page Deprecated. Defines a default font, color, or size for the text in a page Defines the text direction Defines big text Defines a long quotation Defines the document's body

<caption> <center> <cite> <code> <col /> <colgroup>

Defines a table caption Deprecated. Defines centered text Defines a citation Defines computer code text Defines attribute values for one or more columns in a table

Defines a group of columns in a table for formatting


Defines a description of a term in a definition list Defines deleted text Defines a definition term Deprecated. Defines a directory list Defines a section in a document Defines a definition list Defines a term (an item) in a definition list Defines emphasized text Defines a border around elements in a form

<dd>
<del> <dfn> <dir> <div> <dl>

<dt>
<em> <fieldset>

<h1> to <h6> <head> <hr /> <html> <i> <iframe> <img /> <input /> <ins> <isindex> <kbd> <label> <legend> <li> <link />

Defines HTML headings Defines information about the document Defines a horizontal line Defines an HTML document Defines italic text Defines an inline frame Defines an image Defines an input control Defines inserted text Deprecated. Defines a searchable index related to a document Defines keyboard text Defines a label for an input element Defines a caption for a fieldset element Defines a list item Defines the relationship between a document and an external resource

<noscript>

Defines an alternate content for users that do not support client-side scripts Defines an embedded object Defines an ordered list Defines a group of related options in a select list Defines an option in a select list Defines a paragraph Defines a parameter for an object Defines preformatted text

<object> <ol> <optgroup> <option> <p> <param /> <pre>

<q>
<s> <samp> <script> <select> <small>

Defines a short quotation


Deprecated. Defines strikethrough text Defines sample computer code Defines a client-side script Defines a select list (drop-down list) Defines small text

<style> <sub> <sup> <table> <tbody> <td> <textarea> <tfoot> <th> <thead> <title> <tr> <tt>

Defines style information for a document Defines subscripted text Defines superscripted text Defines a table Groups the body content in a table Defines a cell in a table Defines a multi-line text input control Groups the footer content in a table Defines a header cell in a table Groups the header content in a table Defines the title of a document Defines a row in a table Defines teletype text

<u>

Deprecated. Defines underlined text

THANK YOU

You might also like