Tags in html


Published on

Published in: Education, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Tags in html

  2. 2. INTRODUCTION TO HTML HTML is a language made for creating the web pages for the websites. By using HTML language one can make his web pages or even his own website. As the HTML is a very easy language for creating the web pages. It can be learned in few hours or in few days. It is the basic format of the HTML file it can be displayed on mostly operating system which supports the web browser. Tags are the reserve keywords used in the HTML file. With the help of tags we can set the format of the text and elements used in the file. In HTML language all of the files are written using tags. Even starting of the html file is done by the <html> tag and ended with the </html> end tag. Tags are the reserved keywords used in the HTML.
  3. 3. BASIC TAGS IN HTML Some of the Basic Tags in the Html are: 1.<html> - defines the html document.This element tells a browser that this is an HTML document. This tag is defined at the top of the HTML file and at the end of file. 2.<head> - defines information about the document.The head tag defines information about the document. The browser does not display the &quot;head information&quot; to the user. The following tags can be in the head section: <base>, <link>, <meta>, <script>, <style>, and <title>. The head tag is used between <html> and <body> tags. 3. <title> - defines the document title.Title tag defines the title of the document which appears in the Title bar of the explorer window. Title tag is used in between <head> and </head> tag because it is title tag is section of <head> tag.
  4. 4. 4.<body> - defines the document's body.The body element defines the document's body. It contains all the contents of the document 5.<p> - defines a paragraph.This tag is used for creating the paragraph in the web page. It is used inside the body of file. 6.<br> - Inserts a single line break.The <br> tag inserts a single line break. We can use the <br> tag to enter blank lines but not to separate paragraphs. This tag has no end tag. 7.<hr> - The <hr> tag inserts a horizontal rule. The <hr> tag has no end tag. 8.<!--> - defines a comment.The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.
  5. 5. CHARACTER FORMAT TAGS(CF TAGS) These tags are used for the formatting of the text such as underline, bold, italic, font, size, color of the text. 1.<b> Tag - The <b> tag is used to make the text bold. 2.<i> Tag - The <i> tag displays the italic text. 3.<tt> Tag - The <tt> tag displays the typewriter text. 4.<u> Tag - The <u> tag displays the underlined text. 5.<em> Tag - The <em> tag displays the emphasized text. 6.<big> Tag - The <big> tag displays the big text. 7. <small> Tag - The <small> tag displays the small text. 8.<strong> Tag - The <strong> tag displays strong text. 9.<sub> Tag - The <sub> tag displays text in subscripted format. 10.<sup> Tag - The <sup> tag displays superscripted text. 11.<bdo> Tag - The <bdo> tag defines the direction of the text. 12.<font> Tag - The <font> tag defines the font, color, size of the text.
  6. 6. OUTPUT TAGS These tags are often used to display computer/programming code. 1.<pre>.........</pre>Tag - This is preformatted text. It preserves both spaces and line breaks. The pre tag is good for displaying computer code. 2.<code> .....text ......</code> Tag - This tag is also used to display the computer code. But better you use <pre> tag. 3.<kbd>.....Keyboard Input......</kbd> Tag - This tag displays the Keyboard Input. 4.<tt>......text....</tt> Tag - This tag displays the typewriter text. 5.<samp>....sample text...</samp> Tag - This tag displays the sample text.
  7. 7. 6.<var> computer variable </var> - This tag defines the computer variable. 7. <dfn> definition term </dfn> - this tag is used for definition term. BLOCK TAGS 1. <acronym>..text..</acronym>Tag The tag defines the start of an acronym, like &quot;WWW&quot; . By marking up acronyms you can give useful information to browsers, spell checkers, translation systems and search-engine indexers. The title attribute can be used to show the full version of the expression when you are holding the mouse over the acronym(text). 2.<abbr>..text..</abbr> - Indicates an abbreviated form, like &quot;Inc.&quot;, &quot;etc.&quot;. By marking up abbreviations you can give useful information to browsers, spell checkers, translation systems and search-engine indexers.
  8. 8. 3. <address> ..address..</address> tag - The <address> tag defines the start of an address. You should use it to define addresses, signatures, or authorships of documents. The address usually renders in italic. 4.<blockquote>.........Text........</blockquote> - The <blockquote> tag defines the start of a long quotation. 5.<center>....</center> - This tag Centers its enclosed text horizontally. 6.<q> small text</q> - The <q> tag defines the start of a short quotation. 7.<cite> - This tag defines the citation. 8.<ins> - This tag provide the facility of inserting the text in between the text. 9.<del> - Defines text that has been deleted in a document. 10.<s>or<strike> - The <s> and <strike> tags defines strikethrough text.
  9. 9. OTHER TAGS 1. The <style> tag -The <style> tag defines a style in a document. The style element goes in the head section. If we want to include a style sheet in your page, we should define the style sheet externally, and link to it using <link>. Using this tag you can initialize the text properties . 2.The <div> tag - The <div>tag defines a division/section in a document. Use the <div> tag to group block-elements to format them with styles. This tag is used below the <body> tag. 3.Marquee Text with <marquee> Tags- This tag is used to to get a moving text. As on the television you see the moving news headlines. You can do this by using the <marquee> tag.