HTML-Basic With Examples

Published by Admin on

In this chapter we will learn some basic HTML examples. for eg. HTML Documents, HTML <!DOCTYPE> Declaration, HTML Headings, HTML Paragraphs, HTML Links, HTML Line Break and HTML Images.

HTML Editors- Notepad

How to run HTML Using Notepad?
Follow the steps below to create your first HTML web page with Notepad:-

1. Open Notepad for Windows OS Users.

Go to Windows Start > Programs > Accessories > Notepad

2. Write Some HTML Code

Write the following HTML code into Notepad:

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

  <h1>This is Heading tag</h1>
  <p>This is Paragraph tag.</p>

</body>
</html>

3. Save the HTML Code

Save the file on your computer. Select File -> Save/Save as in the Notepad menu. with file name is “index.htm” or “index.html”.

4. Open HTML Page in Your Browser

Open the saved “index.htm” file in your any Windows browser.
know You can View the HTML Page in Your Browser.

Output

HTML Documents

In HTML, All HTML documents should start with document type declaration <!DOCTYPE html>. The HTML document itself starts with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>

The <!DOCTYPE html> declaration represents the document type, and helps browsers to display web pages correctly. <!DOCTYPE html> declaration is not case sensitive.

HTML Headings

HTML headings are defined with the <h1>, <h2>, <h3>, <h4>, <h5> and <h6> tags. <h1> display very large font size and defines the most important heading. <h6> display very small font size and defines the least important heading.

Example

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

HTML paragraphs are defined with the <p> tag, use for Contain Paragraphs format.

Example

<p>This is Paragraph 1 tag.</p>
<p>This is Paragraph 2 tag.</p>

HTML Line Break

HTML Line Break are defined with the <br/> tag, main purpose is to use to give the line break in an HTML document.

Example

<p>This is First Line <br/> This is Second 2 Line.</p>

HTML Anchor Links

HTML Anchor links are defined with the <a> tag, use for open another html page.

Example

<a href="https://intechnologies.in">This is Anchor Links</a>

The destination of the link is specified in the href attribute.

HTML Images

HTML images are defined with the <img> tag, use for Display Images on your web page.

<img> tag attributes is:
(src)=source file
(alt)=alternative text
image width and 
image height

Example

<img src="image_name.jpg" alt="image alternative text" width="200" height="200">


0 Comments

Leave a Reply

LinkedIn
LinkedIn
Share
Instagram
Follow by Email
YouTube
YouTube
Telegram
RSS