HTML INTRODUCTION

                  INTRODUCTION ON HTML

Html is a markup language that enables you to create attractive and interactive websites.
It enables you to present a text in a readable format.For Examples-on the front of the newspapers, certain news heading are the bigger than the others.The news heading are followed by the  details of the news stories in paragraphs, sometimes pointing to a different page.If the details are on the different page, page number is specified along with the story or the heading.






Basic Html Code
<!DOCTYPE HTML>
<Html>
<Head>
<Title>My First Blog</Title>
</Head>
<Body>
      Write your blog
</Body>
</Html>
The Html page contain the following structural tags:

<!DOCTYPE HTML> 
The<!DOCTYPE> tag provide the instruction to the browser about the version of the HTML.

<Html>
The <Html> tag specifies to the browser that a document is a  Html document.The  opening Html tag<html> and closing Html tag</html>mark the beginning and end of a webpage.

<Head>
The <Head>tag is contained within the <Html> and </Html>tags.It is used to describe the header of the Html document.

<Body>
The <Body>tag set the boundary for the content in the Html document.When the webpage is displayed in the browser, user can see the content enclosed within the opening<Body>and the closing<Body>.

<Meta>
Consider a situation where you need to specify some keywords for your website so that they can be easily searched by the search engines.To implement such functionality, you can use the <Meta>tag.

<Head>
<Title>Book your Hotel</Title>
<META name="description" content=" this website provides you the benefit of booking rooms in the best hotels">
<META name="keywords" content="hotels,online,booking">
<META name="author" content="Harry Anem">
<META  http-equiv="refresh" content="30">
</Head>
<Body>
</Body>

<Style>
The content of the Webpages is rendered without colors and styles in the browser. This makes it non appealing to the users.To rendered the content of the Webpages aesthetically and to make it attractive, you need to style the text.For this you can use the <Style>tag.

Consider the following code snippet for designing a <Style> tag.


<!DOCTYPE HTML>
<HTML>
<HEAD>
<STYLE type="text/css">
h1{color:red;}
p {font-style:italic;}
</STYLE>
</HEAD>
<BODY>
<H1>BOOK YOUR HOTEL</H1>
<P>IT PROVIDE ONLINE BOOKING FACILITY</P>
</BODY>
<HTML>

In the preceding snippet code , the <STYLE> tag specifies that the heading is displayed in red color and the paragraph in italic.  When the browser come across the relevant  tags in the body section, it applies  the style associated with it  while rendering the Web page .

The output of the preceding code snipped is displayed 




<Base>

The  <Base> tag  specifies a base URL  or address for all  the related links on a page. For Example all the images, that  are to be  used in a website during its construction and hosting  are located in a particular directory.To access these image , you can specify the absolute path of the directory by using the  href attribute of the Base tag. Thereafter , you can refer  to any image in the body section of the Web page simply by specify the image name 
You can create one <Base> tag in a document.

Consider the following code snippet for defining the <Base> tag.

<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> THE BASE TAG EXAMPLE</TITLE>
<BASE href="d:/Images/">
</HEAD
<BODY>
<img src ="img1.jpg">
<BR>
</BODY>
</HTML>

<Style>

The content of a Web Page is rendered without colors and styles in the browser. This makes it non appealing to the viewers. To rendered the content of the Web page aesthetically and to make it attractive, you need to stylize the text, For this you can use the <Style> tag.

Consider the following snippet code for defining the <Style> tag.

<!DOCTYPE HTML>
<HTML>
<HEAD>
<STYLE type="text/css">
h1{color:red;}
p{font-style:italic;}
</STYLE>
</HEAD>
<BODY>
<H1>Book Your Hotel</H1>
<P> It provides online booking facility</P>
</BODY>
</HTML>

In the preceding code snippet, the <Style> tag specifies that the heading is displayed in red color and the paragraph is italic . When the browser come across relevant tags in the body section , it applies the style associated  with it while rendering the Web page.

The output of the preceding code snippet is displayed as shown in the following figure


About Codingwelove

Codingwelove
Recommended Posts × +

0 comments:

Post a Comment