HTML BASIC Contents

Fundamental

HTML elements

Basic HTML Tags

HTML List

HTML Image FUNDAMENTAL

What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text  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. FUNDAMENTAL HTML Tags: HTML markup tags are usually called HTML tags  HTML tags are keywords surrounded by angle brackets like  HTML tags normally come in pairs like and  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. FUNDAMENTAL HTML Document = Web Page  HTML documents describe web pages, it contain HTML tags and plain text  Structure of the web page: information of the web page content display on browser FUNDAMENTAL   The purpose of a web browser (like Internet Explorer or Firefox) 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 FUNDAMENTAL Editing HTML  We use a plain text editor (like Notepad) to edit HTML. This is the best way to learn HTML.  However, professional web developers often prefer HTML editors like FrontPage or Dreamweaver, instead of writing plain text. HTM or HTML Extension?  When you save an HTML file, you can use either the .htm or the .html extension.  With new software it is perfectly safe to use .html. HTML ELEMENTS HTML Elements: An HTML element is everything from the start tag to the end tag: Start tag * Element content End tag *

This is a paragraph

This is a link
HTML ELEMENTS HTML Element Syntax  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  Empty elements are closed in the start tag  Most HTML elements can have attributes HTML ELEMENTS Nested HTML Elements  Most HTML elements can be nested (can contain other HTML elements).  HTML documents consist of nested HTML elements. Empty HTML Elements  HTML elements without content are called empty elements. Empty elements can be closed in the start tag. 
is an empty element without a closing tag HTML ELEMENTS Example:

This is my first paragraph

Explain:  The element defines the whole HTML document.  The element defines the body of the HTML document.  The

element defines a paragraph in the HTML document HTML ELEMENTS HTML Attributes  HTML elements can have 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“.  Attribute values should always be enclosed in quotes Example This is a link HTML ELEMENTS Below is a list of some attributes that are standard for most HTML elements:

Attribute Value Description class class_rule or style_rule The class of the element id id_name A unique id for the element style style_definition An inline style definition A text to display in a tool title tooltip_text tip BASIC HTML TAGS HTML Headings  Headings are defined with the

to

tags. •

defines the largest heading. •

defines the smallest heading . Example

This is a heading1

This is a heading2

This is a heading3

Browsers automatically adds an empty line before and after headings. BASIC HTML TAGS Example

This is heading 1

This is heading 2

This is heading 3

This is heading 4

This is heading 5
This is heading 6
BASIC HTML TAGS HTML Rules (Lines)  The
tag is used to create an horizontal rule (line). Example:

The hr tag defines a horizontal rule:


This is a paragraph


This is a paragraph

BASIC HTML TAGS Optional Attributes of the
tag:
Example:



BASIC HTML TAGS HTML Comments  Comments can be inserted in the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. Example

This is a regular paragraph

BASIC HTML TAGS HTML Paragraphs:  Paragraphs are defined with the

tag  Browsers automatically adds an empty line before and after paragraphs. Example:

This is a paragraph.

This is a paragraph.

Don't forget to close your HTML tags!

BASIC HTML TAGS HTML Line Breaks:  Use the
tag if you want a line break (a new line) without starting a new paragraph.  The
element is an empty HTML element. It has no end tag. 
or
Example :

This is
a paragraph
with line breaks

BASIC HTML TAGS HTML Text Formatting:  HTML uses tags like and for formatting output, like bold or italic text.  These HTML tags are called formatting tags. Example:

This text is bold

This text is big

This text is italic

This is subscript and superscript

BASIC HTML TAGS

Text Formatting Tags Tag Description Defines bold text Defines big text Defines emphasized text Defines italic text Defines small text Defines strong text Defines subscripted text Defines superscripted text Deprecated. Use styles instead BASIC HTML TAGS HTML Styles : The style attribute is a new HTML attribute. It introduces CSS to HTML. The purpose of the style attribute is:  To provide a common way to style all HTML elements .  With HTML styles, styles can be added to HTML elements directly by using the style attribute, or indirectly by in separate style sheets (CSS files).. BASIC HTML TAGS Examples • style="background-color:yellow" • style="font-size:10px" • style="font-family:Times" • style="text-align:center" Some the attribute always use:  Background Color Ex:  The style attribute defines a style for the element. BASIC HTML TAGS  Font Family, Color and Size Ex:

– The style attribute defines a style for the

element.  Text Alignment Ex:

– The style attribute defines a style for the

element. BASIC HTML TAGS HTML Fonts: content Example:

This is a paragraph.

BASIC HTML TAGS Font Attributes

Attribute Example Purpose size="number" size="2" Defines the font size size="+number" size="+1" Increases the font size size="-number" size="-1" Decreases the font size face="face-name" face="Times" Defines the font-name color="color-value" color="#eeff00" Defines the font color color="color-name" color="red" Defines the font color BASIC HTML TAGS The Right Way to Do It - With Styles:

This is a paragraph with style.

HTML Colors HTML Color Values: HTML colors are defined using a hexadecimal (hex) notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex 00). The highest value is 255 (hex FF). Hex values are written as 3 double digit numbers, starting with a # sign. HTML Colors HTML Colors HTML Color Names:  The W3C HTML and CSS standards have listed only 16 valid color names: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. HTML Colors To change the color scheme of web page you use Body tag.