Thursday, 14 April 2022

HTML TUTORIAL

 

HTML Tutorial for BSCIT Students

RAJNISH 
  

HTML - Hypertext Markup Language is THE Tool to design and make webpages and ultimately rule Cyberspace.
It is a extention for create web page and store on world wide web.
Then you or anyone open this page on globle area of the earth.
It's extension is HTML.
It's starting with this tag-   <HTML>
& end with-                      </HTML>


Here is simple example of HTML-

<HTML>
<HEAD><TITLE>This is my first web page</TITLE></HEAD>
<BODY>
This is my first web page.<BR>
<FONT COLOR="RED">I read in ZHI (patna) from sikkim manipal university.</FONT><BR>
I Hope  ZHI is the best It study center in Bihar.<BR>
Here faculty always think that they help student.
</BODY >
</HTML>
And then you save filename.html.
Then open this file in internet explorer
Output is-
















Monday, 28 March 2011

Href Command

1. You already have an image used in your first page so lets now make that a link. We are going to make it link to "Page1.html"
2. The HTML code for an image link looks like this:
<a href="Page1.html"><img src="images/yourpichere.jpg"></a>
If you are linking to another website on the WWW then your link would look like this:
<a href="http:coll.merajnish@rediffmail.com><img src="images/yourpichere.jpg"></a>
For now though we are going to link your "index.html" file to your "Page1.html" file.
This is the code that needs to be placed in your "index.html" file
<a href="Page1.html"><img src="images/yourpichere.jpg"></a>
Remember to change the red text to the location of your pictue.
If your picture is in its own "Images" folder as discussed in a previous chapter then the obove code would be used.
If it is in the same folder as your "index.html" file then the following code would be used:
<a href="Page1.html"><img src="yourpichere.jpg"></a>

Here is what your code should now look like:
<html>
<head>
<title>My Own Home Page </title>
</head>
<body>
<body bgcolor= "yellow">
<font color="Red">
<H1> I am Your-Name and this is my web Page!</H1>
<a href="Page1.html"><img src="images/myimage.gif"></a>
<a href="Page1.html">Click Here for my next page</a>
</font>
</body>
Thats probably the easiest chapter in the book and shouldnt have taken you too long.

Paragraph & Font Editing

<p> - This is used for when you would like to start a new paragraph
<br> - A page break, this is used for starting a new line

Dont worry if this is all confusing, here is the paragraph again with the HTML tags, paste it into your document and then run it to see the results.
<p>"This is a standard paragraph of text. <br>Nothing to see here just typing some words for an HTML formatting example.<p>
HTML formatting can be difficult for novice users, so hopefully you will find this chapter as painless as possible.<p>
This is a long chapter but dont worry your about half way through!
Now we are going to look at aligning the text (Note - this method can be used on pictures, Flash and any other objects of your website)

Aligning things is simple in HTML, these are the following tags to be used:
<center>Text to be centered here</center>
<p align =left>Text to be aligned left here</align>

<p align =right>Text to be aligned right here</align>
If you are struggling here is my code, have a look at the yellow parts and see if yours is the same: (notice I have also centered the image)
<html>
<head>

<title>My Own Home Page </title>
</head>

<body>
<body bgcolor= "yellow">
<font color="Red">
<H1> I am Your-Name and this is my web Page!</H1>
<center><a href="Page1.html"><img src="images/myimage.gif"></a></center>

<a href="Page1.html">Click Here for my next page</a>
<center><p>"This is a standard paragraph of text. <br>Nothing to see here just typing some words for an HTML formatting example.<p></center>
<p align = right>HTML formatting can be difficult for novice users, so hopefully you will find this chapter as painless as possible.<p></align>
<p align = left>This is a cheap plug in a paragraph of text for my website bscithelp.blogspot.com. If you find this guide helpful then you can have a look at my website for more great web guides written by me!<p></align>
<p align = right>End of my meaningless paragraph of text!"</align>
</font>
</body>

NOTE: The spelling "center" is american, if you use the English spelling "Centre" your HTML will not work.
5. Now for the final part of the chapter! Sizing, underlining and making your text bold.
There are a number of ways to alter the size of your text in HTML, I am going to show you what I feel is the easiest, you can use numbers ranging from 1 - 7 (1 is small, 7 is large)
THIS IS SIZE 1
THIS IS SIZE 2
THIS IS SIZE 3
THIS IS SIZE 4
THIS IS SIZE 5
THIS IS SIZE 6
THIS IS SIZE 7
Lets take our paragraph again, this time we will make the first paragraph size 5.
This is the code to be used:

<font size = 5>Your text goes here</font>
This is how your 1st paragraph of code should now look, dont worry if you need to space out the HTML like I have done below:
<center><p>
<font size =5>"This is a standard paragraph of text. <br>Nothing to see here just typing some words for an HTML formatting example.</font>
<p>
</center>

You can obviously replace the number 5 with any number of your choice from 1 - 7. Experiment and see what results you get.

6. We are finally going to look at making our font Bold, Itallic and Underlined.
This is incredible simple, these are the following tags used:

<b>Look at me im Bold</b>
<i>Look at me im Itallic</i>
<u>Look at me im Underlined</u>

Just like our other tags, the text you want to format goes inbetween the open <b> and closed </b> tags.
Try and use the three tags on your paragraph, experiment and see what results you get.
Again if you are struggling below is my HTML code:

<html>
<head>

<title>My Own Home Page </title>
</head>

<body>
<body bgcolor= "yellow">
<font color="Red">
<H1> I am Rajnish and this is my web Page!</H1>
<center><a href="Page1.html"><img src="images/myimage.gif"></a></center>

<a href="Page1.html">Click Here for my next page</a>
<center>
<p>
<font size =5><b>"This is a standard paragraph of text. <br>Nothing to see here just typing some words for an HTML formatting example.</b></font>
<p>
</center>

<p align = right><i>HTML formatting can be difficult for novice users, so hopefully you will find this chapter as painless as possible.</i><p></align>
<p align = left><u>This is a cheap plug in a paragraph of text for my website www.elpassobooks.co.uk. If you find this guide helpful then you can have a look at my website for more great web guides written by me!</u><p></align>
<p align = right>End of my meaningless paragraph of text!"</align>
</font>
</body>

Table

Tables

Tables come in very handy in HTML, not just for presenting data but for designing the layout of your page.
As you are new to HTML I am going to show you how to create your own basic table. Many beginners find tables very daunting and I was no different, dont worry if you dont get it first time, keep trying and it will eventually all fall into place!

1. There are 3 main tags for the table we will be creating:
Table - <table>
Table Row - <tr>
Table Cell - <td>
I will now show you how to create the following table:
Cell1 Cell2
Cell3 Cell4


And here's the code:

<table border>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>

As you can see, the first table row encloses cells 1 and 2; the second table row encloses cells 3 and 4. Table rows always run horizontally. The contents of each cell - in this case, the words "Cell 1" or "Cell 2" - are sandwiched between the <td> and </td> tags.
In order to see the table, I added border to the table tag. This simply turns the border on. You can also specify its width by adding a number, as in <table border=5>.

"Colspan" and "rowspan"
You can also make a cell in one row stretch across two cells in another. Like this:
Cell 1
Cell 3 Cell 4

To accomplish this, you have to use the colspan modifyer. Just add colspan=2 to the <td>, and voilà!

<table border>
<tr>
<td colspan=2>Cell 1</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>

You can also do this:
Cell 1 Cell 2
Cell 3

Just add rowspan=2 to the <td>, like so:

<table border>
<tr>
<td rowspan=2>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
</tr>
</table>

Just remember: Rows run horizontally, columns run vertically. So if you want to stretch a cell horizontally, use colspan. To stretch a cell vertically, use rowspan.
{NOTE:-IF YOU WANT TO CHANGE THE TEXT COLOR IN SINGLE ROW IN THE TABLE. WRITE THIS IN UNDER THE "TR" COMMAND}:-
<TR STYLE="COLOR:RED">

Basic tag

Now 
I have now shown you the basic HTML tags to get you started, but did you know about the following tags, some useful, some not so useful!

Basic Tags

<html></html>
Creates an HTML document

<head></head>
Sets off the title and other information that isn't displayed on the Web page itself

<body></body>
Sets off the visible portion of the document
Header Tags

<title></title>
Puts the name of the document in the title bar

Body Attributes

<body bgcolor=?>
Sets the background color, using name or hex value

<body text=?>
Sets the text color, using name or hex value

<body link=?>
Sets the color of links, using name or hex value

<body vlink=?>
Sets the color of followed links, using name or hex value

<body alink=?>
Sets the color of links on click

Text Tags

<pre></pre>
Creates preformatted text

<hl></hl>
Creates the largest headline

<h6></h6>
Creates the smallest headline

<b></b>
Creates bold text

<i></i>
Creates italic text

<tt></tt>
Creates teletype, or typewriter-style text

<cite></cite>
Creates a citation, usually italic

<em></em>
Emphasizes a word (with italic or bold)

<strong></strong>
Emphasizes a word (with italic or bold)

<font size=?></font>
Sets size of font, from 1 to 7)

<font color=?></font>
Sets font color, using name or hex value

Links

<a href="URL"></a>
Creates a hyperlink

<a href="mailto:EMAIL"></a>
Creates a mailto link

<a name="NAME"></a>
Creates a target location within a document

<a href="#NAME"></a>
Links to that target location from elsewhere in the document

Formatting

<p></p>
Creates a new paragraph

<p align=?>
Aligns a paragraph to the left, right, or center

<br>
Inserts a line break

<blockquote>
</blockquote>
Indents text from both sides

<dl></dl>
Creates a definition list

<dt>
Precedes each definition term

<dd>
Precedes each definition

<ol></ol>
Creates a numbered list

<li></li>
Precedes each list item, and adds a number

<ul></ul>
Creates a bulleted list

<div align=?>
A generic tag used to format large blocks of HTML, also used for stylesheets

Graphical Elements

<img src="name">
Adds an image

<img src="name" align=?>
Aligns an image: left, right, center; bottom, top, middle

<img src="name" border=?>
Sets size of border around an image

<hr>
Inserts a horizontal rule

<hr size=?>
Sets size (height) of rule

<hr width=?>
Sets width of rule, in percentage or absolute value

<hr noshade>
Creates a rule without a shadow

Tables

<table></table>
Creates a table

<tr></tr>
Sets off each row in a table

<td></td>
Sets off each cell in a row

<th></th>
Sets off the table header (a normal cell with bold, centered text)

Table Attributes

<table border=#>
Sets width of border around table cells

<table cellspacing=#>
Sets amount of space between table cells

<table cellpadding=#>
Sets amount of space between a cell's border and its contents

<table width=# or %>
Sets width of table — in pixels or as a percentage of document width

<tr align=?> or <td align=?>
Sets alignment for cell(s) (left, center, or right)

<tr valign=?> or <td valign=?>
Sets vertical alignment for cell(s) (top, middle, or bottom)

<td colspan=#>
Sets number of columns a cell should span

<td rowspan=#>
Sets number of rows a cell should span (default=1)
<td nowrap>
Prevents the lines within a cell from being broken to fit

Frames

<frameset></frameset>
Replaces the <body> tag in a frames document; can also be nested in other framesets

<frameset rows="value,value">
Defines the rows within a frameset, using number in pixels, or percentage of w idth

<frameset cols="value,value">
Defines the columns within a frameset, using number in pixels, or percentage of width

<frame>
Defines a single frame — or region — within a frameset

<noframes></noframes>
Defines what will appear on browsers that don't support frames

Frames Attributes

<frame src="URL">
Specifies which HTML document should be displayed

<frame name="name">
Names the frame, or region, so it may be targeted by other frames

<frame marginwidth=#>
Defines the left and right margins for the frame; must be equal to or greater than 1

<frame marginheight=#>
Defines the top and bottom margins for the frame; must be equal to or greater than 1

<frame scrolling=VALUE>
Sets whether the frame has a scrollbar; value may equal "yes," "no," or "auto." The default, as in ordinary documents, is auto.

<frame noresize>
Prevents the user from resizing a frame

Forms

For functional forms, you'll have to run a CGI script. The HTML just creates the appearance of a form.

<form></form>
Creates all forms

<select multiple name="NAME" size=?></select>
Creates a scrolling menu. Size sets the number of menu items visible before you need to scroll.

<option>
Sets off each menu item

<select name="NAME"></select>
Creates a pulldown menu

<option>
Sets off each menu item

<textarea name="NAME" cols=40 rows=8></textarea>
Creates a text box area. Columns set the width; rows set the height.

<input type="checkbox" name="NAME">
Creates a checkbox. Text follows tag.

<input type="radio" name="NAME" value="x">
Creates a radio button. Text follows tag

<input type=text name="foo" size=20>
Creates a one-line text area. Size sets length, in characters.

<input type="submit" value="NAME">
Creates a Submit button

<input type="image" border=0 name="NAME" src="name.gif">
Creates a Submit button using an image

<input type="reset">
Creates a Reset button

Tuesday, 22 February 2011

HTML Tutorial for BSCIT Students

RAJNISH 
  

HTML - Hypertext Markup Language is THE Tool to design and make webpages and ultimately rule Cyberspace.
It is a extention for create web page and store on world wide web.
Then you or anyone open this page on globle area of the earth.
It's extension is HTML.
It's starting with this tag-   <HTML>
& end with-                      </HTML>


Here is simple example of HTML-

<HTML>
<HEAD><TITLE>This is my first web page</TITLE></HEAD>
<BODY>
This is my first web page.<BR>
<FONT COLOR="RED">I read in ZHI (patna) from sikkim manipal university.</FONT><BR>
I Hope  ZHI is the best It study center in Bihar.<BR>
Here faculty always think that they help student.
</BODY >
</HTML>
And then you save filename.html.
Then open this file in internet explorer
Output is-






















 Our first code

HTML has two sections, the "Head" section and the "Body".
The head section is that the information about the web page is put for  browser. This has nothing to do with the heading that you want to see on our web page.
Things that can be stored in the head section include Keywords for search engines or the title of our webpage
The body section is that the web page is coded. This is where you put the information for your web page.

We are now going to create our very own webpage, for now we are going to create a simple page telling people your name.
Please follow these instructions:
  1. Create a new folder so you have somewhere to save your website, call this folder anything you wish, this is where all pages and images for your website will be saved.
  2. Open notepad and type the following code, you may change the code in yellow to suit your needs:

    Type the following code into Notepad

    <html>
    <head>

    <title>My Own Home Page </title>
    </head>

    <body>
    <H1> I am Your-Name and this is my web Page!</H1>
    </body>

    </html>
  3. Thats it! You have just coded your first web page. Now save the notepad file by selecting "Save as" (make sure you save the file in the folder you have just created)


    In the filename box type "index.html" and from the "Save as type" box select "All Files"
    Then click "Save"
  4. You are now ready to view your first web page, navigate to the folder where you saved the file, double click on it and you will see your first web page.

  1. Adding Images

    Adding an image is a simple way to make your website more attractive.
    For this exercise find any image you like, and put it into the same folder as the web page. Rename your image to "my image"

    We are w going to insert the image underneath our text.
    Once again open up your HTML file in notepad so you can see the code.

    Note:- that my image file is called "myimage.gif", your file may be "myimage.jpg" or "myimage.bmp" depending on how you saved your picture. To find out what type of picture it is right click on the picture and select "Properties".
    Once inserted your code will look like this:
    <html>
    <head>
    <title>My Own Home Page </title>
    </head>
    <body>
    <body bgcolor= "blue">
    <font color="Red">
    <H1> I am Your-Name and this is my web Page!</H1>
    <img src="C:\Documents and Settings\Administrator\My Documents\My Pictures\2008-11-18, Picture\Picture 024.jpg"width="30%">
    </font>
    </body>
    </html>
    Save your file and run it to view the results. Your page will look something like this:

 रजनीश कुमार
MASTER OF COMPUTER APPLICATION 
आवास - बुद्धा काॅलनी , अदलवारी, हाजीपुर

Call me on 9162183349
या मेल करे rajnish.zhi@gmail.com