HTML क्या है?
Html language का use करके हम Browser को यह समझाते है कि, हमारे Webpage की information user को कैसी दिखनी चाहिए। आप अभी जिस Website को पढ़ रहे है इसका भी Structure Html language के इस्तेमाल से ही किया गया है। Hypertext और markup यह दो अलग शब्द है, जिनकी परिभाषा कुछ इस प्रकार है।
- Hypertext दो web pages को आपस मे एक text के अंदर जोड़े रखता है । ताकि जब कोई user उस text के ऊपर क्लिक करे तो वह उसे अगले webpage पर पंहुचा दे। इस प्रकार, Web pages पर उपलब्ध लिंक को hypertext कहा जाता है।
- Markup language किसी भी web page के Structure को बनाने के काम में आती है। Html के अलावा DHTML, XHTML, XML XSLT etc. भी markup language है। परन्तु Html सबसे ज्यादा इस्तेमाल होने वाली language है।
HTML का इतिहास
HTML में Tag क्या है
Example 1
2. Unpaired HTML Tag
Example को समझिए
- HTML Element एक HTML Document का Root Element होता है. इस Element से Browser को पता चलता है कि यह एक HTML Document है. Opening
Tag, अन्य HTML Elements (Body, Heading और Paragraph), और Closing
Tag, अन्य HTML Elements (Heading और Paragraph), और Closing
Tag से एक Body Element का निर्माण होता है.
Tag, Heading Text, और Closing
Tag से एक Heading Element का निर्माण होता है.
Tag, Paragraph Text, और Closing
Tag से एक Paragraph Element का निर्माण होता है.
एक Opening Heading Tag है. और
Nested HTML Element
Empty HTML Element
.- name एक property है, जिसे आप set करना चाहते है। for example – image को extra configure करने के लिए src attribute का use किया जाता है। तो यहां पर image tag के attribute का name src है। जिसका उपयोग हम image को extra configure करने के लिए करेंगे।
- value वह है, जो आप property के द्वारा उस element में Set करना चाहते है। value को हमेशा quotation (” “) के भीतर लिखा जाता है। उप्पर उदाहरण में image attribute की value url है, जहाँ पर image का url set करने पर web page में image show होने लगती है।
- <! DOCTYPE> ― यह Doctype tag किसी भी Browser को यह बताता है, कि Run की गई Document file किस type (html, xml etc.) में है। इसका पूरा नाम Document Type Definition है।
- ― यह टैग html element का Root element होता है। यह browser को बताता है, कि Run की गई file html document में है।
- ― यह tag बाकी head element’s का Container element होता है। head element में Document की important information enclosed रहती है। title, style, base, link, meta, script, noscript जैसे element’s इसी टैग के भीतर लिखे जाते है।
- ― यह टैग Document की Body को परिभाषित करता है। किसी web page में show होने वाला Content area इसी head element की मदद से Creat किया जाता है। body element में Document का सारा Content जैसे – text, hyperlink, images, tables, lists etc. को शामिल किया जाता है
― यह टैग Document के title को define करता है। हर html document के लिये title tag required होता है। title tag को head element के भीतर लिखा जाता है। - ― tag html document के बारे में metadata provide करता है। metadata page पर show नही होगा, लेकिन machine parsable होगी। meta element आमतौर पर page description, keyword, author of the document, last modified, and other matadata specify करने के लिए use किये जाते है।
HTML Text Tags
All html tags जो Web page के Content Area को Design करते है, उन्हें Text Tags कहा जाता है। नीचे दिए गए text tags का उपयोग करके आप html Document में text को अपने हिसाब से Control कर सकते है।
― यह टैग html heading को define करता है। एक html document में से लेकर
तक heading tag use किये जाते है।
document की most important heading को define करता है। वही
,
,
,
,
least important heading को define करते है
element के पहले व उसके बाद में browser automatically कुछ स्थान जोड़ते है।
― यह टैग Single line break element को define करता है। document में paragraph line को अलग करने के लिये line break element का use किया जाता है।- — Strong tag एक phrase tag है। important text को Define करने के लिये इस element का use किया जाता है।
- ― Division element document में एक Section को define करता है। Style container के रूप में भी इस element को use किया जाता है।
- ― यह टैग Bold text को define करता है। इसके इस्तेमाल से Document में किसी Important text को Bold ( गहरा ) किया जा सकता है।
- ― यह Comment tag है।Source code में Comment add करने के लिये Comment element use किया जाता है।
― Code element एक phrase tag है। यह Computer code text को define करता है।
- ― Sample element एक phrase tag है। यह एक Computer program से sample output को define करता है।
- ― q element एक Short quotation को define करता है। Browser normally quotation के चारो ओर quotation marks डालते है
― delete element किसी document में से हटाए गए पाठ (deleted text) को define करता है। इस टैग की help से document के किसी भी text को delete किया जा सकता है।- ― inserted element किसी document में सम्मिलित पाठ (inserted text) को define करता है । इस टैग की मदद से पुराने text को delete करके नया text insert किया जाता है।
- ― Span tag किसी Document में एक Section को define करता है। Span element के use से किसी text का Color Change किया जाता है
- ― Font element किसी font का Size व Color specify करता है।
- ― Big element Define करता है, big text को व Small element Define करता है, Small text को।
- ― i element define करता है, italic text को। i tag का use technical term एक thought या किसी खास नाम इत्यादि को indicate करने के लिए किया जाता है।
- ― Pre element का use preformatted text को indicate करने के लिए किया जाता है। pre tag का use करने से text एक fixed-width font में displayed होता है।
- ― Contact information define करने के लिए Address element का use किया जाता है। इस element का use हम address detail show करने के लिए करते है।
- ― Superscript text define करने के लिए SUP element का use किया जाता है। Superscript text normal line के ऊपर half character में show होते है। इन्हें small font भी कहा जाता है। Superscript text का use footnotes लिखने के लिए किया जाता है।
- ― Subscript text define करने के लिए SUB Element का use किया जाता है। Subscript text एक Normal text को normal line के नीचे Half character में show करता है। Chemical formulas जैसे- H20 लिखने के लिए इस element का use किया जाता है।
- ― Citation को specifies करने के लिए लिए CITE Element का use किया जाता है। इसे एक Work के title को define करने के लिए भी use किया जाता है।
- ― Variable Define करने के लिए VAR Element का use किया जाता है।
HTML Link Tags
- ― Hyperlink Define करने के लिए a element का use होता है। इस elemet की help से one page को another page से link किया जाता है। a element का सबसे important attribute href है। href attribute किसी दसरे page के link को a tag में add करता है।
― BASE Element किसी Document में All relative url के लिए Base Url/Target Specifies करता है। एक html document में maximum base url head element के अंदर होते है।
HTML Image Tags
Html Document में Image insert करने के लिए Image tags का use किया जाता है। नीचे दिए गए tags का use करके आप Html document में image insert कर सकते है।
- ― tag एक html page में image define करता है। image element के src और alt दो required attributes है। image का source address set करने के लिए src attribute का use होता है।
- ―
- ―
element के कई element है, जो image map में click करने योग्य clickable area को define करते है।
HTML Table Tags
Html document में table creat करने के लिए Table Tags का use किया जाता है। table tags के कई attributes होते है, जिनकी help से एक html table की width, border, frame, height, spacing between cells etc. Set की जाती है। नीचे दिए गए table tags के use से आप एक html table creat कर सकते है।
―
tag एक html table define करता है। html table में एक table element और एक या उससे अधिक
, , and element होते है।
―
element एक html table में table row define करता है।
― element एक html table में table header define करता है।
― element एक html table में table cell define करता है।
Note – एक complex html table में
, , , , , और element भी include हो सकते है।
HTML Frame Tags
एक से ज्यादा html document को एक ही Webpage पर display करने के लिए html में इन Frame tags का use किया जाता है। Web development languages जैसे – PHP, CSS आने के बाद html5 में इन Frame tags का use नही किया जाता है । पर एक बुनियादी चीज़ को समझने के लिए आपको इन्हें एक बार जरूर प्रयोग करना चाहिए।
- ―
- ― tag एक frame को define करता है। frame element को frameset element के अंदर frame set करने के लिए place किया जाता है।
- ― iframe document के अंदर एक inline frame बनाता है।
― noframes tag non frame based rendering के लिए एक container को define करता है।
HTML Form Tags
Users से information Collect करने के लिए Webpages में Form का use किया जाता है। इस Form को create करने के लिए हम इन Form tags का उपयोग करते है।
- ― form tag का उपयोग users द्वारा input किये गए data को send करने के लिए किया जाता है।
- ― tag एक input field define करता है। जब आप इस element के प्रकार विशेषता के लिए एक text specify करते है, तो एक text box बनाया जाता है।
- ―
- ―
- ―
- ―
- ―
- ―
- ―
HTML Embed Tags
Embed tag एक बाहरी application or interactive contact ( a plug-in) के लिए एक Container define करता है।
- ― tag का उपयोग object की initial values specify करने के लिए किया जाता है। यह element object or applet element के साथ उपयोग किया जाता है।
कुछ HTML Attribute List
1. src Attribute
Html में image insert करने के लिए tag का use किया जाता है। src img tag का attribute है। image का source address set करने के लिए src attribute use किया जाता है।
HTML में img का source address set करने के दो तरीके है। अगर image आपके computer में same location पर save है। जहाँ आपने document file save की है, तो आप सिर्फ उसका नाम देकर image set कर सकते है। परन्तु अगर image computer पर different location में save है, तो फिर आपको उसका complete path देना होगा।
Example-:
2.Width and height Attribute
Html में image का आकार set करने के लिए size attribute का इस्तेमाल होता है।size attribute की help से image की height और width set की जाती है।
Example-:
example of height and width attribute html attribute
3.Alt AttributeAlternative text specify करने के लिए alt attribute का use किया जाता है। Alt attribute किसी image के लिए alternative information provide करता है। अगर किसी कारणवश image web page पर show नही होती है, तो इससे user अपना mouse चित्र के ऊपर ले जा कर वह image किस बारे में है। यह पता कर सकता है।html attribute4.href AttributeHtml Link को से define किया जाता है। tag में link को specified करने के लिए href attribute का use होता है।Example-:href attribute example
5.lang Attributeएक document की language को html tag में lang attribute की help से declared किया जाता है। Accessibility applications और serch engine के लिए html document की language set करना अनिवार्य है।Example-:lang attribute example
6.Style AttributeStyle attribute का उपयोग किसी element के Style ( Colour,Font,Size etc.) को specify करने के लिए किया जाता है।Example-:<! DOCTYPE html>Style attribute example
paragraph
7.title Attributetitle Attribute किसी element के बारे में extra information provide करता है। जब mouse उस element के ऊपर ले जाया जाता है, जिसमे title attribute use हुआ है, तो set की गयी जानकारी tooltip text के रूप में show होती है।Example-:<! DOCTYPE html>title Attribute example
this is title attribute
Tags
Nice
ReplyDelete