Thursday 1 February 2018

Basic information about HTML


HTML Basic Examples



HTML Documents


If you use to HTML 5 THEN Add <!DOCTYPE html>.

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

Other wise start simply like this <html>

The HTML document itself begins with <html>and ends with </html>.



The visible part of the HTML document is between <body> and </body>.

<!DOCTYPE html>
<html>

       <head>

            <title>This is first season</title>
       </head>
<body>

     <h1>My First Heading</h1>
     <p>My first paragraph.</p>

</body>
</html>
Results is billow figure..





Note:- In head tag don't show in body tag if i write any word in <head> between </head> nothing display Do not forget the End Tag


<!DOCTYPE html>
<html>
<body>

<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>

</body>

</html>



HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

<!DOCTYPE html>
<html>
<head>
<title>HTML session 1 lesson 1</title>
</head>
<body>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

</body>
</html>















HTML Links

HTML links are defined with the <a> tag:



<!DOCTYPE html>
<html>
       <head>
            <title>This is first season learn <a> tag </title>
       </head>
 <body>

           <a href="http://phpcodesfree.blogspot.in">This is a link</a>

</body>
</html>









HTML Images

HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:

<!DOCTYPE html>
<html>
       <head>
            <title>This is first season learn <img> tag </title>
       </head>
 <body>

          <img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg"alt="W3Schools.com"width="50%" height="50%">

</body>
</html>


0 comments:

Post a Comment