Skip to main content

Introduction to html

HTML stands for Hyper Text Markup Language it was created by Berners-Lee in late 1991 , which is the most widely used language on Web to develop web pages.Web browsers can read HTML files and compose them into visible or audible web pages. Browsers do not display the HTML tags and scripts, but use them to interpret the content of the page. HTML describes the structure of a website semantically along with cues for presentation, making it a markup language, rather than a programming language .

HTML VERSION

VERSION  YEAR

Html.             1991  

Html 2.0.       1995  

Html 3.2.       1997  

Html 4.01.     1999

XHtml.           2000

Html5.            2012

GETTINGS TARTED 

HTML files are just simple text files, so to start writing in HTML, you need a simple text editor ,for learning HTML a simple text editor like Notepad (PC) or Text Edit (Mac) will be easy . HTML can be edited by using a professional HTML editor like Adobe Dreamweaver , Microsoft Expression Web,Coffee Cup HTML Editor .

To Create A Simple Webpage With Notepad :

Open Notepad (PC) or Text Edit (Mac)

WRITE SOME HTML INTO TEXT EDITOR :Following is an example of a simple HTML document with Heading and Paragraph :The Following code can be copy/pasted in the "do it yourself" Section.

<!DOCTYPE html> 

<html> 

<body>

 <h1>This is Heading</h1>

 <p> This is paragraph</p> 

</body> 

</html> 

Save The Html Page :

The finished page should be saved in examples.Html extension .

UTF-8 is the preferred encoding for HTML files . 

To view the html page :

Open the saved HTML file in your browser. 

A Simple HTML Document :

<!DOCTYPE html> 

<html> 

<head> 

<title>Title of the page</title> 

</head> 

<body> 

<h1>This is Heading</h1> 

<p>This is paragraph</p> 

</body> 

</html> 

Explanation for the above HTML document :

HTML BASICS

1.The DOCTYPE declaration defines the document type to be HTML.

2.The text between <html> and </html> describes an HTML document.

3.The text between <head> and </head> provides info about the document.

4.The text between <title> and </title> provides a title for the document.

5.The text between <body> and </body> describes the visible page content.

6.The text between <h1> and </h1> describes a heading.

7.The text between <p> and </p> describes a paragraph.LINE BREAK IN HTML : 

Ifyou use the <br> tag , anything following it starts from the next line . This tag is an example of an empty element, there is no need for opening and closing tags, as there is nothing to go in between them.

Example for Line break :
<!DOCTYPE html> 
<html> 
<head> 
<title>Example for Line Break </title> 
</head> 
<body> 
<p>This<br> is an example for<br> Line Break</p> 
</body> 
</html> 
CENTERING CONTENT :
To center any content in HTML You can use <center> tag this will to put any content inside the tag in the center of the page or any table cell.
Example for Centering content :
<!DOCTYPE html> 
<html>
 <head> 
<title>Centering content</title>
 </head> 
<body>
 <p>This is not in the center .</p> <center> 
<p>This is in the center.</p> 
</center> 
</body> 
</html> 
PRESERVE FORMATTING :
If want your text to be exact format of how it is written in the HTML document you can use the preformatted tag <pre>. Any text between the opening <pre> tag and the closing </pre> tag will preserve the formatting of the source document.
Example for Preserve formatting :
<!DOCTYPE html>
 <html>
 <head> 
<title>Preserve Formatting</title>
 </head> 
<body>
 <pre> This is an Example for preserve </pre> 
</body> 
</html> 
HORIZONTAL LINE :
To create a horizontal line between a section of document the <hr> tag can be used it creates a line from the current position in the document to the right margin and breaks the line accordingly .
Example for horizontal line :
<!DOCTYPE html>
 <html> 
<head> 
<title>Horizontal Line </title>
 </head>
 <body> 
<p>This is above the line</p>
 <hr />
 <p>This is below the line</p>
 </body> 
</html> 

     To be continue NEXT POST...

Thanks for reading

Comments

Popular posts from this blog

What is Computer?

 The word computer originates from the word compute which means to calculate. It was initially used to refer to human beings that perform calculations. A computer has been defined so many forms by different authors. Some of the definitions are as follows: - Computer :-  is an electronic device that accepts data as input Process the data and gives out information as output.  - Computer :- It can be defined as an electronic or electromechanical device that is capable of accepting data, holds a means of instruction in its memory, process the information given by following sets of instructions to carry out a task without human intervention and at the end provide significant result. - Computer :- is any machine which accepts data and information presented to it in a prescribed form,carry out some operations on the input and supply the required result in a specified format as information or as signals to control some other machines or process. - Computer :- is an ele...

System Analysis and Design: A Comprehensive Overview

System analysis and design is a critical phase in the development of software systems. It involves a structured approach to understanding, defining, and designing solutions to meet business needs or address problems. This process ensures that the resulting system is efficient, effective, and aligned with user requirements. Let's delve into the key components and stages of system analysis and design:  1. System Analysis: Understanding Requirements and Problems In this stage, system analysts gather and analyze information to understand the current system or business processes, identify problems, and determine user needs. The goal is to define the scope and objectives of the project.  Requirements Gathering:  Analysts interact with stakeholders to gather requirements, including functional, non-functional, and user-specific needs. Interviews, surveys, observations, and workshops are used to collect detailed information. Problem Identification:  Existing problems, ineffic...

Algorithm Analysis ,Time and Space Complexities

An algorithm is a step-by-step procedure or set of rules for solving a problem or performing a specific task. Algorithm analysis involves evaluating the efficiency and performance of algorithms, particularly in terms of their time and space complexities.  These complexities provide insights into how an algorithm's runtime and memory requirements grow as the input size increases.  Time Complexity: Time complexity measures the amount of time an algorithm takes to run as a function of the input size. It helps us understand how the algorithm's performance scales with larger inputs. Common notations used to express time complexity include Big O, Big Theta, and Big Omega. - Big O Notation (O()): It represents the upper bound on an algorithm's runtime.  For an algorithm with time complexity O(f(n)), the runtime won't exceed a constant multiple of f(n) for large inputs. -Big Omega Notation (Ω()): It represents the lower bound on an algorithm's runtime.  For an algorithm w...