Top Banner
61
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: H T M L Tutorial
Page 2: H T M L Tutorial

Hyper Text Markup Language A markup language designed for the creation

of web pages and other information viewable in a browser

The basic language used to write web pages File extension: .htm, .html

Page 3: H T M L Tutorial

If we have some text e.g. “This is my first day of work, I’m so excited!”

If we want to display the Text as :“This is my first day of work, I’m so excited!” Then we need to mark “first day of work” as

Bold.

Page 4: H T M L Tutorial

“This is my first day of work, I‟m so excited!”

To be marked in Bold letters.

Page 5: H T M L Tutorial

first day of work“This is my , I‟m so

excited!”

<B> </B>

Result is :

“This is my first day of work, I‟m so excited!”

Page 6: H T M L Tutorial
Page 7: H T M L Tutorial

1. Open Notepad2. Click on File -> Save as…3. In the File name pull-down box, type in

webpage.html4. Click on Save5. Type in content for your file6. Once you finished the content, click on File -

> Save

Page 8: H T M L Tutorial
Page 9: H T M L Tutorial
Page 10: H T M L Tutorial
Page 11: H T M L Tutorial

Select “All Files” from the “Save as type” drop down list

box.

Page 12: H T M L Tutorial
Page 13: H T M L Tutorial
Page 14: H T M L Tutorial
Page 15: H T M L Tutorial

There are 3 ways to view the web page generated by the HTML file.

Page 16: H T M L Tutorial

Go to Start -> Run

Page 17: H T M L Tutorial

Click on Browse button.

Page 18: H T M L Tutorial

Select the location of the HTML file (Where it is stored on your PC)

Page 19: H T M L Tutorial

Select “All Files” option from the “Files of Type” Drop Down Menu.

Page 20: H T M L Tutorial

Select the required HTML file from the list of all files in that location.

Page 21: H T M L Tutorial

Click on the Open button after selecting the file.

Page 22: H T M L Tutorial

The Web Page appears according to the HTML formats provided.

Page 23: H T M L Tutorial

Open any browser e.g. IE, Mozilla Firefox, Opera , Netscape Navigator etc.

Click Open -> Browse to the location of the File. Select the file and click Open.

Page 24: H T M L Tutorial
Page 25: H T M L Tutorial

Go to My Computers. Navigate to the actual

location of the HTML file.

Select the HTML file. Double click to open it.

Page 26: H T M L Tutorial

We use HTML tags to mark the elements of a file for the browser, in other words, we use tags to denote the various elements in an HTML document. HTML tags consist of a left angle bracket (<), a tag name, and a right angle bracket (>). Tags are usually paired (e.g., <H1> and </H1>) to start and end the tag instruction. The end tag looks just like the start tag except a slash (/) precedes the text within the brackets.

Page 27: H T M L Tutorial

For example: <b>, <font>,<title>, <p> etc. Tag usually goes with pair: an open tag (<b>) and

an end tag (<\b>)

Single tag: <hr>,<br> Tags are NOT case sensitive

Effect Code Code Used What It Does

Bold B <B>Bold</B> Bold

Italic I <I>Italic</I> Italic

Page 28: H T M L Tutorial

Each HTML tag has certain additional options for providing more information to the final output.

These options are called ATTRIBUTES. E.g. : <BODY BGCOLOR=“Red”>…..</BODY> Here BODY is the Tag and BGCOLOR is the

Attribute.

Page 29: H T M L Tutorial

<html> <head>

<title> Page Title Goes Here </title></head>

<body> content goes here

</body></html>

Page 30: H T M L Tutorial

<HTML><HEAD>

<TITLE>My First Web Page</TITLE></HEAD>

<BODY>Today is my first day at my new job, I’m so

excited!</BODY>

</HTML>

Page 31: H T M L Tutorial

<center>….Text….</center> <left>….Text….</left> <right>….Text….</right> <B>….Text….</B> <I>….Text….</I> <U>….Text….</U>

For aligning the text towards the center of the web page.

For aligning the text towards the left of the web page.

For aligning the text towards the right of the

web page.For applying BOLD font style to the enclosed text.

For applying ITALIC font style to the enclosed text.

For applying Underline font style to the enclosed text.

Page 32: H T M L Tutorial

The heading tag is used to format the enclosed text as large bold characters for displaying the heading of the web page content.

For Example

Page 33: H T M L Tutorial

This is the application of <h1>….</h1> tag on the text.

Page 34: H T M L Tutorial

There are 6 levels of the heading tag :

<h1>……….Text…………</h1><h2>……….Text…………</h2><h3>……….Text…………</h3><h4>……….Text…………</h4>

<h5>……….Text…………</h5><h6>……….Text…………</h6>

Page 35: H T M L Tutorial

Each level of the heading tag formats the enclosed heading text with different font sizes beginning from the largest <h1> to <h6>.

We can also apply the various formatting tags on it too.

Page 36: H T M L Tutorial

<HTML><HEAD>

<TITLE>My First Web Page</TITLE></HEAD>

<BODY><h1>My First Day of Work!</h1>Today is my first day at my new job, I’m so

excited!</BODY>

</HTML>

Page 37: H T M L Tutorial

Hyper Text Markup Language

Web authoring software language

Specifically created to make World Wide Web pages

Created by Tim Berners-Lee in 1993 from SGML

Page 38: H T M L Tutorial

BGCOLOR

Specifies a background-color for an HTML page.

<body bgcolor="#000000">

<body bgcolor="rgb(0,0,0)">

<body bgcolor="black">

Page 39: H T M L Tutorial

Using the Color Code : „#000000‟ or „RGB(0,0,0)‟ or „black‟ gives

the black color in the background.

Page 40: H T M L Tutorial

Method I -- Simple Language Codes

• Using the name of the color : e.g. Red, Black, Blue, Yellow, Pink, Orange etc.

Page 41: H T M L Tutorial

Orange color in the background.

Page 42: H T M L Tutorial

<html><head>

<title>My First Web Page</title></head>

<body bgcolor=“Orange"><h1>My First Day at Work!</h1>

</body></html>

Page 43: H T M L Tutorial

Method II -- Hexadecimal Codes

• Using any arbitrary combination of alphabets and numbers preceded by a „#‟ symbol.

• Like : <body bgcolor = “#abc123”>

Page 44: H T M L Tutorial

A random(green) color in the background.

Page 45: H T M L Tutorial

<html><head>

<title>My First Web Page</title></head>

<body bgcolor=“#abc123"><h1>My First Day at Work!</h1>

</body></html>

Page 46: H T M L Tutorial

Method III -- Using RGB function

• Using the RGB() function in the following manner : RGB(r,g,b) where :

r = red color componentg = green color componentb = blue color component

• Example : <body bgcolor = rgb(3,4,5)>

Page 47: H T M L Tutorial

A random(violet) color in the background.

Page 48: H T M L Tutorial

<html><head>

<title>My First Web Page</title></head>

<body bgcolor=RGB(150,44,100)><h1>My First Day at Work!</h1>

</body></html>

Page 49: H T M L Tutorial

Background Attribute in the Body tag.

Specifies a background-image for a HTML page<body background="clouds.gif"> <body background="C:\Windows\FeatherTexture.bmp">

Page 50: H T M L Tutorial
Page 51: H T M L Tutorial

<html><head>

<title>My First Web Page</title></head>

<body background="C:\Windows\FeatherTexture.bmp"><h1>My First Day at Work!</h1>

</body></html>

Page 52: H T M L Tutorial

Some simple tips :

Step 1• Search for some pictures available on your PC.

Page 53: H T M L Tutorial

You can provide the image type (*.jpg,*.gif,*.bmp,*.png) etc. to narrow your search.

Page 54: H T M L Tutorial

Select any image and browse to its location.

Page 55: H T M L Tutorial

Copy the actual location of the image.

Page 56: H T M L Tutorial

The location copied is :“C:\Documents and Settings\new user\My Documents\My Pictures”

Page 57: H T M L Tutorial

Select “Properties”.

Page 58: H T M L Tutorial

Select and copy the filename from the Properties Dialog Box and check its type also.

The Complete path to the image is :“C:\Documents and Settings\new user\My Documents\My Pictures\Giraffe.jpg”

Page 59: H T M L Tutorial

<html><head><title>My First Web Page</title></head>

<body background= “C:\Documents and Settings\new user\My Documents\My Pictures\Giraffe.jpg” ><h1>My First Day at Work!</h1></body></html>

Page 60: H T M L Tutorial

Background image is applied at the back

Page 61: H T M L Tutorial