HTML Documents

All HTML documents has a type declaration: <!DOCTYPE >.

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

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

Example:–

<!DOCTYPE html>
<html>
<body>

Other Html Code….

</body>
</html>

Heading Tags

HTML has six levels of heading tags, which use the basics <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.

Example: –

<!DOCTYPE html>

<html>

<head>

<title>Heading Tags Example</title>

</head>

<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>

Paragraph Tag

The <p> tag used a way to arrange your text into different paragraphs. Each paragraph of tag should have an opening <p> and a closing </p> tags.

Example:–

<!DOCTYPE html>
<html>
<body>

<p>This is first paragraph.</p>
<p>This is second paragraph.</p>

</body>
</html>

Line Break Tag

The <br /> element, something starts from the next line. This tag do not need opening and closing tags.

Example:–

<body>

<p>Please<br/>

Call me when you are free.<br/>

I have some urgent work</p>

</body>

HTML Links

HTML links are defined with the <a> tag. This tag also known as anchor tag and used for adding a link of web page.

Example:–

<body>

<a href=”http://www.webetutorial.com”>This is an anchor tag</a>

</body>

Centering Content

You could use <center> tag to put any content in the center of web page.

Example:–

<body>

<p>this text shows in the left side. </p>

<p><center>this text shows in the center.</center></p>

</body>

HTML Images

The <img> tag used for HTML images.The img tag attributes, src used for source file and alt used for alternative text.

Example:–

<body>

<img src=”webetutorial.jpg” alt=”Webetutorial.com” >

</body>

Related Article