Wednesday 27 January 2016

HTML Basic

HTML documents must start with a type declaration : <!DOCTYPE html>
The Html document itself begins with <html> and ends with </html>
The visible part of the HTML documents is between <body> and </body>

Example  :


<!DOCTYPE html>
<html>
<body>

<h1> Heading</h1>
<p> Paragraph.</p>

</body>
</html>


HTML Heading

Html headings are define with the <h1> to <h6> tags


Example  :

<!DOCTYPE html>
<html>
<body>

<h1> Heading1 </h1>
<h2> Heading2 </h2>
<h3> Heading3 </h3>
<h4> Heading4 </h4>
<h5> Heading5 </h5>
<h6> Heading6 </h6>

</body>
</html>

HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

<!DOCTYPE html>
<html>
<body>

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

</body>
</html>

HTML Links

HTML links are defined with the <a> tag:


<!DOCTYPE html>
<html>
<body>

<a href="http://www.facebook.com">This is a link</a>

</body>
</html>

The link's destination is specified in the href attribute
Attributes are used to provide additional information about HTML elements.


HTML Images

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

<!DOCTYPE html>
<html>
<body>

<img src="facebook.jpg"  alt="facebook.com" width="104" height="142">

</body>

</html>

No comments:

Post a Comment