Introduction To Html head body tag with attribute - O Level

Introduction To Html head body tag with attribute

Introduction to HTML

Hello Student, In this Article you will learn about Basics information of html. Here you will learn Introduction To Html head body tag with attribute. So must check out the full article till end.

Introduction To Html head body

HTML (Hypertext Markup Language) is used to create document on the World Wide Web. It is simply a collection of certain key words called ‘Tags’ that are helpful in writing the document to be displayed using a browser on Internet. HTML was developed by Tim Berners-Lee in 1992.

CREATING, SAVING AND VIEWING A HTML DOCUMENT

Creating a HTML document

The essential tags that are required to create a HTML document are:

 

 <HTML>………….</HTML>

 <HEAD>………….</HEAD>

 <BODY>………….</BODY>

 

HTML Tags

Tags are instructions that are embedded directly into the text of document.Html Tags are signals to a browser that should do something other than just through text upon the screen.All HTML tags begin with an open angle bracket (<) and end with close angle bracket (>).

HTML tags can be two types:-

1) Paired Tag (Container)

2) Singular Tags (Empty)

 

1) Paired Tag (Container)

Tags which have both the opening and closing i.e. <TAG> and </TAG> are called container tags.They hold the text and other HTML tags in between the tags. The <HTML>, <HEAD>, <TITLE> and <BODY> tags are all container tags.

Example:

<TAG> this is a container tag. It holds both the text and HTML tag </TAG>

 

Empty Tags: Tags, which have only opening and no ending,are called empty tags. The <HR>, which is used to draw horizontal, rule across the width of the document, and line break <BR> tags are empty tags.

Basic Structure of HTML

<HTML>

<HEAD>

………….

………….

………….

</HEAD>

<BODY>

…………

………….

………….

</BODY>

</HTML>

 

HTML Tag <HTML>

The <HTML> tag encloses all other HTML tags and associated text within your document. It is an optional tag. You can create an HTML document that omits these tags, and your browser can still read it and display it. But it is always a good form to include the start and stop tags.

The format is:

<HTML>

Your Title and Document (contains text with HTML tags) goes here

</HTML>

Most HTML tags have two parts, an opening tag and closing tag. The closing tag is the same as the opening tag, except for the slash mark  e.g</HTML>. The slash mark is always used in closing tags.

An HTML document has two distinct parts HEAD and BODY.

 

HEAD Tag <HEAD>

HEAD tag comes after the HTML start tag. It contains TITLE tag to give the document a title that displays on the browsers title bar at the top.

The Format is:

<HEAD>

<TITLE>

Your title goes here

</TITLE>

</HEAD>

 

BODY Tag <BODY>

The BODY tag contains all the text and graphics of the document with all the HTML tags that are used for control and formatting of the page.

The Format is:

<BODY>

Your Document goes here

</BODY>

An HTML document, web page can be created using a text editor, Notepad or WordPad. All the HTML documents should have the extension .htm or .html. It requires a web browser like Internet Explorer or Netscape Navigator/Communicator to view the document.

 

Attributes of <BODY> Tags

BGCOLOR: used to set the background color for the document

 

Example:

<BODY BGCOLOR=”yellow”>

Your document text goes here.

</BODY>

TEXT: used to set the color of the text of the document

Example:

<BODY TEXT=”red”>

Document text changed to red color

</BODY>

LEFTMARGIN: set the left hand margin of the document

Example:

<BODY LEFTMARGIN=”60″>

This document is indented 60 pixels from the left hand side

of the page.

</BODY>

TOPMARGIN: set the left hand margin of the document

Example:

<BODY TOPMARGIN=”60″>

This document is indented 60 pixels from the top of the page.

</BODY>

BACKGROUND: It is used to point to an image file (the files with an extension .gif, .jpeg) that will be used as the background of the document. The image file will be tiled across the document.

Example:

<BODY BACKGROUND=”filename.gif”>

Your document text goes here

</BODY>

Thanks for reading the article i hope you will understand the topic Introduction To Html head body tag with attribute well.

For Live class Visit on our youtube channel

https://www.youtube.com/@olevelguruji

Also Check

Internet Website FrontEnd Vs BackEnd

Leave a Comment