HTML Basics

This is a HTML basics documents.

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

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

</body>
</html>

HTML Documents

All HTML documents start with <! DOCTYPE html>

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

The HTML code inside the <head> and </head> tag of the HTML document is invisible.

The HTML code inside the HTML document is displayed in the <body> and </body> tag.

Example

<!DOCTYPE html>
<html>
<head>
</head>
<body>

<h1>Heading 1</h1>
<h2>Heading 2</h2>

<p>paragraph</p>

</body>
</html>

HTML Paragraphs

The <p> tag is used for paragraph in HTML.

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

HTML Headings

The <h1> to <h6> tag is used for heading in HTML.

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

HTML Links

The <a> tag is used for link in HTML.

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

HTML Images

The <img> tag is used for images in HTML.

<img src="filename.jpg" alt="some text" width="100" height="150">

HTML Buttons

The <button> tag is used for button in HTML.

<button>Save</button>