HTML

HTML Definition:-HTML stands for Hypertext markup language.It is used for write web page.

Hypertext:-It means to way in which web pages are linked together so,the link is available on a web page that is called as Hypertext.

Markup Language:-It means you are use HTML to simply “mark up” text document with tags that tell  web browser how to structure it to display

Basic HTML Document example:-

<!doctype html>

<html>

<head>

<title>My first page</title>

</head>

<body>

<h1>This is heading</h1>

<p>This is paragraph</p>

</body>

</html>

when we run this page before this page will be save as text.html [.html ] is the extension of html page. then this page will be run on Internet Explorer,Chrome,Firefox,Google etc.

HTML Tags:-These are the basic tags which is used in HTML.

  • <!doctype html> It defines the document type and html version.
  • <html> This tags enclosed the complete HTML document.
  • <head> This tag is represent the head section of the page.
  • <body> This tag is represent the body section which keeps the some other tags eg-<h1>,<h2>,<div>,<p> etc.
  • <title> This tag represent the title of the page and that is used inside the head section.
  • <h1> This tag represent the heading and others eg-<h1>,<h2>,<h3>,<h4>,<h5> and <h6>.
  • <p> This tag is represent the paragraph section.
  • <i> This tag is used for italic format.
  • <center> This tag is used for center algined.
  • <br> This tag is used for break a line and one of tag is used as strating tag not be used as closing tag.This tag is also used as <br/>.
  • <hr> This tag is represent the horizontal lines .This tag is used for create from a current position.In the document to the right margin and break the line accordingly. this tag is also used as <hr/>.
  • <pre> This tag is represent the exact format and that is written between opening <pre> and closing </pre> tag.
  • &nbsp When you would not want the break/split in these words then &nbsp used it.

example:-

<>!doctype html>

<html>

<head>

<title><center>first page</center></title>

</head>

<body>

<h1>heading first</h1>

<h2>heading second</h2>

<h3>heading third</h3>

<h4>heading fourth</h4>

<h5>heading five</h5><!–top up defined–>

<hr>

<h6>heading six</h6><!–bottom up defined–>

<p>paragraph first</p><br>

<p>paragraph second</p>

<pre>

function test function (street)

{

alert (street)

}

</pre>

</body>

</html>

These all tags are used for create a web page and order to format.

HTML Document Structure:-

Document Declartion:- This is defined as-

<!doctype html>

Document Declaration Tags:- That is define by an example-

<!doctype html>

<html>

<head>Document Header related.</head>

<body>Document body related</body>

</html>

HTML v/s Element:– That is defined by eg- <p> this is starting tag of paragraph and </p> is a closing tag but <p> this is a paragraph element </p> is a paragraph element.

Nested Element:- It is allowed to keep one HTML element inside another HTML element.

 

Leave a Reply

Your email address will not be published. Required fields are marked *