Category Archives: Html Tutorial

Html Formatting


Html Formatting: Html Formatting is used to add different types of text.


There are following types of formatting available in html

  • Bold text/Important text
  • Italic text/Emphasized text
  • Marked text
  • Small text
  • Deleted text
  • Inserted text
  • Subscripts
  • Superscripts

Html Formatting

Example





Bold : This is paragraph 1.

This is paragraph 2.

Try it »

Html Styles


Html Styles : For Styling the style attribute tag is used. Style attribute basically provides the styling to the html elements.


Html Styles

Example





This is paragraph 1.

This is paragraph 2.

Try it »

html styles example

html styles example

Html Paragraphs


Html Paragraphs : Html Paragraphs are defined using <p> tag.


Html Paragraphs

Example





This is paragraph 1.

This is paragraph 2.

Try it »

Output :

Html paragraphs tag example

Html paragraphs tag example

Html Headings


Html Headings : Html provides heading tags for adding headings in the html document.


Variability in Html Headings

There are following headings available in the html.

h1, h2, h3, h4, h5, h6

Example





H1 Heading

H2 Heading

H3 Heading

H4 Heading

H5 Heading
H6 Heading

Try it »

Outout

html headings examples

html headings examples

Heading Font Sizes

Example






H1 Heading

H2 Heading

H3 Heading

H4 Heading

H5 Heading
H6 Heading

Try it »


Html Attributes


Html Attributes: Html element’s attribute are used to provide some more information about the element.


This way you can use Attributes Syntax


Note 1 : Attributes are always defined in the start tag of the element.
Note 2 : Single Quote or double Quote any one can be used.
Example :


Lets Understand with very simple examples:

Html Attributes Example : Title

Example






Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....

Try it »

Output :

Html Attributes Example

Html Attributes Example

Attributes Example : href

Output :

Html Elements


Html Elements: Are written within start and end tag. Content is written between the tags. Tags are always in pair of start and end.


Syntax for Html Elements

content

Example :

Hiiiii(content)

Html Elements Example

Example





Main Heading

Paragraph.



Heading 2

Try it »

Output :

Html Elements

Html Elements

Tags Description

[table width=”100%” colwidth=”10|100|290|160″ colalign=”left|left|left|left|left”]
No,Start Tag,End Tag,Description
1, <html>, </html>, Defines the html document
2, <title>, </title>, Defines the title of the page.
3, <head>, </head>, Defines the information about the page
4, <body>, </body>, Contains the visible part of page.
5,<h1>,</h1>, Defines the heading in the page.
6, <p>,</p>, Defines the paragraph.

[/table]

Note : Always Close the tags

Example :

My Paragraph

Tags are not case sensitive

But we prefer to use lowercase.

Html Documents


Html Documents : Starts with the DOCTYPE declaration ie .. The main document of html start with tag and ends with tag.


Html Documents

Below is simple example of the html document.

Example





Heading

Paragraph.

Try it »

The above example contains basically following parts:

1. Doctype Declaration : is used to declare the document type.
2. Html : defines the root of html.
3. Head : which defines the information about the document.
4. Body : which contains the main and visible part in html.

Html Documents

Html Documents

Html Editors


Html Editors : You can use professional editors such as Microsoft WebMatrix, Subline Text, Dreamweaver etc.


For Learning purpose use Notepad(Text edit for mac).

Steps to use Notepad.

1. Go to Start Search “Notepad” click on notepad to open it.

Notepad

Notepad

2. Add the following code.





Heading

Paragraph.

Html Editors

Html Editors

3. Save it as test.html on desktop or where you want.

notepad2

4. Go to the desktop where you saved the file and open test.htmlin browser.

It Will Show :

output

Note : You can save files with extension .html or .htm.

Html Intro


Html Intro: Html stands for “Hypertext Markup Language” . Markup language is set of tags. Each html tags describes a different document in the page.


HTML Introduction

Lets understand the html base structure with the following example

Example





Heading

Paragraph.

Try it »