What is HTML ?

 

stands for Hyper Text Markup Language. HTML is the standard markup language for Web pages. HTML elements are the building blocks of HTML pages.HTML describes the structure of Web pages using markup. HTML elements are represented by tags.With Cascading Style Sheets and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.

HTML Files

Every web page is actually a HTML file. Each HTML file is just a plain-text file, but with a .html file extension instead of .txt, and is made up of many HTML tags as well as the content for a web page.

A web site will often contain many html files that link to each other. You can edit HTML files with your favourite editor.

HTML Tags

HTML tags are the hidden keywords within a web page that define how your web browser must format and display the content.

Most tags must have two parts, an opening and a closing part. For example, <html> is the opening tag and </html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash ( / ) character. I tend to interperet this as the “end” or “close” character.

There are some tags that are an exception to this rule, and where a closing tag is not required. The <img> tag for showing images is one example of this.

Each HTML file must have the essential tags for it to be valid, so that web browsers can understand it and display it correctly.

The rest of the HTML file can contain as little or as many tags as you want to display your content.

Tag Attributes

Attributes allow you to customise a tag, and are defined within the opening tag, for example:
<img src=”image1.jpg”> or <p align=”center”> … </p>

Attributes are often assigned a value using the equals sign, such as border=”0″ or width=”50%”, but there are some that only need to be declared in the tag like this: <hr noshade>.

Most attributes are optional for most tags, and are only used when you want to change something about the default way a tag is displayed by the browser. However, some tags such as the <img> tag has required attributes such as src and alt which are needed in order for the browser to display the web page properly.

Example:

Below is a basic html document, containing all the essential tags. You can copy the code below, paste it into your editor, and save as mypage.html to start your own web page.

<html>

<head>

<title>MY Page Title</title>

</head>

<body>

<h1>Write Your First Heading</h1>

<p>Write Your First Paragraph.</p>

This is where all my web page content goes!

</body>

</html>

Structural markup indicates the purpose of text

For example, <h2>Golf</h2> establishes “Golf” as a second-level heading. Structural markup does not      denote any specific rendering, but most web browsers have default styles for element formatting. Content may be   further styled using Cascading Style Sheets (CSS).

Presentational markup

For example, <b>boldface</b> indicates that visual output devices should render “boldface” in bold text, but gives little indication what devices that are unable to do this (such as aural devices that read the text aloud) should do. In the case of both <b>bold</b> and <i>italic</i>, there are other elements that may have equivalent visual renderings but that are more semantic in nature, such as <strong>strong text</strong> and <em>emphasized text</em> respectively. It is easier to see how an aural user agent should interpret the latter two elements. However, they are not equivalent to their presentational counterparts: it would be undesirable for a screen-reader to emphasize the name of a book, for instance, but on a screen such a name would be italicized.   Hypertext markup makes parts of a document into links to other documents.To render an image as a  hyperlink, an img element is inserted as content into the a element. Like br, img is an empty element with attributes but no content or closing tag.

HTML5

HTML5 tutorial provides details of all 40+ HTML tags including audio, video, header, footer, data, datalist, article etc. This HTML tutorial is designed for beginners and professionals.

HTML5 is a next version of HTML. Here, you will get some brand new features which will make HTML much easier. These new introducing features make your website layout clearer to both website designers and users. There are some elements like <header>, <footer>, <nav> and <article> that define the layout of a website.

Why use HTML5
It is enriched with advance features which makes it easy and interactive for designer/developer and users.

It allows you to play a video and audio file.

It allows you to draw on a canvas.

It facilitate you to design better forms and build web applications that work offline.

It provides you advance features for that you would normally have to write JavaScript to do.

The most important reason to use HTML 5 is, we believe it is not going anywhere. It will be here to serve for a long time according to W3C recommendation.

HTML 5 Example
Let’s see a simple example of HTML5.

<!DOCTYPE>

<html>

<body>

<h1>Write Your First Heading</h1>

<p>Write Your First Paragraph.</p>

</body>

</html>