Thursday 12 September 2013

Basic HTML elements - Learn HTML in hindi

Basic HTML elements 

         Basic HTML elements  हैं -

The <html> element :

  ये Element किसी भी HTML Document में एक Container Element की तरह काम करता है।

·         <html> element का प्रयोग संपूर्ण HTML पेज के संदर्भ में किया जाता है।
·         element में start tag <html> और end tag </html>
·         इस element मे एक अन्य HTML element (body element) होता है। 

 
<html>

<head>

<title>
learn HTML in hindi – by Indian books publication
</title>

</head>

<body>

<p>This is my first paragraph.</p>

</body>

</html>



<html> Element में दो Direct Child Elements, <head> व <body> Use होते हैं। 

<html> Element में हम निम्न Attributes को भी उपयोग में ले सकते हैं, लेकिन इनके बारे में हम आगे जानेंगे:

id    
dir   
lang  
xml:lang

 

The <head> Element

<head> Element अन्‍य सभी Header Elements का Container Element होता है। सामान्यतया इसे Page का Head कहा जाता है। इस Element में हमेंशा हमारे Web Page से सम्बंधित Information होती हैं। इस Element का <html> Opening Tag के बाद पहला Element होना जरूरी होता है। इसमें हमें Page के Title व Page के Keywords तथा Page के <meta> Element को Include किया जाता है, जिसका प्रयोग विभिन्न प्रकार के Search Engines हमारे Page को Search करने के लिए करते हैं। Page से सम्बंधित विभिन्न प्रकार की जानकारियों को हमें इसी <head> Element के बीच Specify करना होता है।
                  हर <head> Element में एक <title> Element होता है, जो Web Page के Title को Represent करता है। 
<head> Element में निम्नानुसार अन्‍य Elements भी हो सकते हैं और वे किसी भी क्रम में हो सकते हैं:
  • <base> Element
  • <object> Element
  • <link> Element
  • <style> Element
  • <script> Element
  • <meta> Element
Opening <head> Tag में हम निम्न Attributes को भी उपयोग में ले सकते हैं:

id    
dir   
lang  
xml:lang    
profile

profile Attribute को अब उपयोग में नहीं लिया जाता है। हालांकि इसे इसलिए Include किया गया था, ताकि इसका प्रयोग भविष्‍य में किसी ऐसे URL को Specify करने के लिए किया जाता, जिससे Document के Content को Describe किया जा सके।
 
नोट : <head> Element,Title Element के अलावा, ब्राउजर में प्रदर्शित नहीं होते है।
 
<head>

<title>
learn HTML in hindi – by Indian books publication

</title>

</head>




The <body> Element

<body> Element <head> Element के बाद आता है और इसमें हमारे Web Page का वास्‍तविक Content लिखा जाता है, जिसे हम Web Browser Window में देखते हैं। इसे सामान्यतया Body Content भी कहा जाता है।
·         <body> element का प्रयोग  HTML पेज की body के संदर्भ में किया जाता है।
·         element में start tag <body> और end tag </body>
·         इस element मे एक अन्य महत्वपूर्ण HTML element (<p> element) होता है।

                                   <body> Element में विभिन्न प्रकार की Headings, Paragraphs, Images, Forms, Tables आदि को रखा जा सकता है। 

<body> Element में हम निम्न Deprecated Attributes को भी Use कर सकते हैं: 

background        
bgcolor     
alink       
link        
vlink       
text


इनके अलावा कई Browser Specific Attributes भी होते हैं, जिन्हें हम <body> Element में उपयोग में ले सकते हैं। इनमें से कुछ Attributes निम्नानुसार हैं:

language               
bottommargin      
topmargin              
leftmargin           
scroll   
rightmargin       
bgproperties           
marginheight      
marginwidth

 

<body>

<p>This is my first paragraph.</p>

</body>



The <p> element :

·         <p> element का प्रयोग  HTML पेज में paragraph लिखने के लिये किया जाता है।
·         element में start tag <p> और end tag </p>.
·         इस element मे एक content होता है् जैसे यहाँ : This is my first paragraph. (जो ब्राउजर मे प्रदर्शित होता है। )

<p>This is my first paragraph.</p>



 


No comments:

Post a Comment