12
Introduction to HTML 1

Html Slide Part-1

Embed Size (px)

Citation preview

Page 1: Html Slide Part-1

Introduction to HTML

1

Page 2: Html Slide Part-1

2

 Introduction

HTML = HyperText Markup Language

A markup language

Technology of the World Wide Web Consortium (W3C)

HTML is a plain-text file that can be created using a text editor like Notepad.

When creating HTML files for the web, make sure you save them as .html or .htm.

Page 3: Html Slide Part-1

Tags As a text document, your HTML in Notepad will

contain Tags, such as headers, titles, paragraphs, etc.

HTML tags consist of a left angle bracket (<), a name, and a right angle bracket (>)

For example: <title>

Tags must also close using slash( / ).

A starting and ending tag would be: <title> </title>

Page 4: Html Slide Part-1

Types of Tags

Container Tag

Empty Tag

4

Page 5: Html Slide Part-1

Container Tag

Two types of tags: container and empty Container tags contain text between an

opening and a closing tag. Container tags are also known as non-

empty tags

Page 6: Html Slide Part-1

Empty Tags

An empty tag does not use a closing tag

Page 7: Html Slide Part-1

More Tags Any HTML document should contain certain

tags:-<html>-<title>-<body>-<paragraph>

Page 8: Html Slide Part-1

8

How to Create and View an HTML document?

1.Use an text editor such as notepad to write the document.

2.Save the file as filename.html.

3.Open Internet Explorer (or any browser) .

4.Click on File, Open File and select the filename.html .

Page 9: Html Slide Part-1

9

<html> <head> <title>Internet and WWW How to Program - Welcome</title> </head>

<body> <p>Welcome to XHTML!

</p> </body></html>

Example1: First HTML example: main.html

Page 10: Html Slide Part-1

Theory Questions

Q1. What is the purpose of HTML language?

Ans :- HTML is a markup language for creating web documents.

Q2. Write the function of the following tags:

a)HTML :-  The <html> tag tells the browser that this is an HTML document. 

b)BODY :- The <body> tag defines the document's body.c)TITLE :- Define the title of a document.

10

Page 11: Html Slide Part-1

Theory QuestionsQ3. What is the difference between empty and container tags?Ans :-Container Tags

11

Container Tags Empty Tags

• The tags which include an ‘on’ tag and the ‘off’ tag are called container tags.

• Example :- HTML, TITLE, BODY tags.

• In the empty tags there is no ‘off’ tag, these tags have only ‘on’ tag.

• Example :- BR, HR tags.

Page 12: Html Slide Part-1

12