| by Achyut Kendre | No comments

What is HTML?

learn html
Learn HTML

Html is hyper text markup language in initial days it was used to publish or share data on the web. Later on modifications happens in html and now days we can use the html to format or create the presentation of data on web. Now a days we can say html is used for web-page designing or website destining.

Few Things about html

  • HTML stands for Hyper Text Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML provides you tags some times called as markups or html elements
  • In tag we have <tagname>content</tagname>, in general these tags format the content specified in between, but some times they just used to create structure or describe the content.

HTML tags can be –

  • Unary Tags
  • Binary Tags
  • Self Closing Tags

Unary Tags: – unary tags will have only start tag, their will not be end tag or self closing. e.g <br> <hr> etc

Binary Tags: – binary tags will have start tag and separate end tag, we embed the content between these two tags. e.g. <p> content </p>

Select Closing Tags:- are the tags which will not have separate closing tag but will be closed using /. e.g. <img /> <link />

What is HTML Document?

Html document is a file with .html, .htm which contains html tags. You can create html document using any ASCII editor like notepad, edit ++ . You need to save that document using .htm or .html extension.

What is structure of HTML Document?

HTML document will have the following structure -
  tags here 
 tags or content here
  • Every html document starts with <html> and ends with </html>
  • It will have two sections head and body, head contains those tags those format the header of the web browser and body contains those tags which will help you to define the content of document.
  • <head> tag will create the head section
  • <body> tag will create the body section of html document.

What is HTML Attributes?

HTML attributes provide additional information about HTML elements.All HTML elements can have attributes. Attributes provide additional information about elements. Attributes are always specified in the start tag
Attributes usually come in name/value pairs like: name=”value”

What are tags that we can use in Head tag of html?

We can use the following tags in head section of html –

title: –title tag is used to define the title for the document, will be show on header of the html document.
script:- will allow to ebbed the client side script in html document.
link:- will help you to link the html document to external document.
meta – this tag allow you to specify some extra information about the html document to the user. etc.

HTML Headings

HTML headings are titles or subtitles that will be displayed in web page. HTML support six levels of heading starts from h1 tag and ends at h6. h1 defines the most important heading. h6 defines the least important heading.

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

HTML Paragraph

The HTML p tag is used to define paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.

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

Text Formatting tags

HTML provides you following text formatting tags which includes – b, i, u, strong and big.

<b> tag:- is used to make the text bold.
<i> tag:- is used to make the text italic
<u> tag:- is used to make the text underline.
<strong> tag:- is used to make the text more strong.

HTML Lists

HTML list help you to group the data with bullets. Html provides you two types of list one is ordered list and another it unordered list.

Ordered HTML List

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

  <li>Entity Framework</li>

Unordered HTML List

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.


HTML Description List | HTML Definition List

HTML Description List or Definition List displays elements in definition form like in dictionary. The , and tags are used to define description list.

The 3 HTML description list tags are given below:

  • <dl>:=> tag defines the description list
  • <dt> :=> tag defines data term.
  • <dd>:=>tag defines data definition (description).
  <dd>is a markup language</dd>  
  <dd>is a programming language and platform</dd>  
 <dd>is a scripting language</dd>  
  <dd>is a query language</dd>   

Few More Html Tags

Sub Script :- to define subscript html provides you <sub> tag. The HTML <sub> element defines subscript text. Subscript text appears half a character below the normal line. Subscript text can be used for chemical formulas, like H2O:

<p> Chemical Formula for Water is H<sub>2</sub>O.

Super Script: superscript is no show above the regular line. The HTML <sup> element defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. e.g. X2+y3+z2

<p> The quadratic equation is X<sup>2</sup>+y<sup>3</sup>+z<sup>2</sup> </p>

Horizontal Line: Html provides you hr tag to create horizontal line.

<p> First line <hr> second line <p>

Line Break :- to insert new line html provides you a tag <br> you can use it as follows –

<p> First line <br> second line </p>

FieldSet & Legend:- will help you to create a rectangular box to load the content with tile.

<fieldset> <legend> this is title </legend> this is filed set used to demo </fieldset>

Image: To display image in html , html provides you <img> tag. It will have following attributes –
src: – allow you to specify the source of image
alt- alternate text for image.
width: – allow you to specify the width of image.
height: allow you to specify the height of the image.

<img src="sampleimg.jpg" alt="noimage" /> 

How to add comment In HTML

You can add comments in your HTML file using tag. So if you will write anything between theses comment tag that will be treated as comment and browser will not read it.

<!-- Comment -->