Different tags and their uses part 2





Hello everyone in this article we are discussing about different tags and their uses... Already we have an article with this concept but some more important tags will be explained in this article. I give a detail explanation about Container tags, non-container tags and special entities and also some important tags... If you have not read that article Click here to read that article... It will helps you to understand this article easily.

Before moving forward please follow our blog for regular updates on programming languages… In previous article we are discussing about different types of tags and their uses and some important tags to display data in browser. Continuing

of that part

Paragraphs: - Text is normally organized into paragraphs in the body of a document. Textual paragraphs appear as the content of a paragraph element, specified with the tag <p>. In displaying the content of a paragraph, the browser puts as many words as will fit on the lines in the browser window. The browser supplies a line break at the end of each line. Line breaks embedded in text are ignored by the browser.

If the content of paragraph tag would be displayed at a position other than the beginning of the line, the browser breaks the current line and inserts a blank line.

Headings: - Text is often separated into sections in documents by beginning each section with a heading. Larger sections sometimes have headings that appear more prominent than headings for sections nested inside them. There are six levels of headings, specified by the tags <h1>, <h2>, <h3>, <h4>, <h5> and <h6>, where <h1> specifies the highest-level heading. Headings are displayed in a boldface font whose default size depends on the number in the heading tag. The heading tags always break the current line, so their content always appears on a new line. Browsers usually insert some vertical space and after all headings.

Preserving whitespace: - Sometimes it is desirable to preserve the whitespace in text, that is, to prevent the browser from eliminating multiple spaces and ignoring embedded line breaks this can be specified with the <pre> tag. <address> tag also same like pre tag. To add address to the browser we have to address tag instead of pre tag.

Block quotations: - Sometimes we want a block of text to be set off from the normal flow of text in a document. In many cases, such a block is a long quotation. The <blockquote> tag is designed for this situation. Browser designers determine how the content of <blockqoute> can be made to look different from the surrounding text. In many cases, the block of text is indented, either on the left or right side or both. Another possibility is that the block is set to italic.

Font styles and sizes: - Early Web designers used a collection of tags to set font styles and sizes. For example, <i> specifies italic and <b> specifies bold. Since the advent of cascading style-sheets (CSS), use of these tags has become low. There are a few tags for font that are still in widespread use, called content-based style tags. They are called content-based because the tag indicates the particular kind of text that appears in their content. In the following, three of the most commonly used content-based tags are described.

The emphasis tag, <em> specifies that its textual content is special and should be displayed in some way that indicates this. Most browsers use italics for such content.

The strong tag, <strong> is like the emphasis tag, but more so. Browser often set the content of strong elements in bold.

The <code> tag is used to specify monospace font, usually used for programming code.

Subscript and superscript characters can be specified by the <sub> and <sup> tags, respectively. These are not content-based tags...

Meta tag: - The meta element is used to provide additional information about a document. It has no content; rather, all of the provided information is specified through attributes. The two attributes that are used to provide information are name and content. The user makes up a name as the value of the name attribute and specifies information through the content attribute. One commonly chosen name is keywords; the value of the content attribute associated with the keywords are those that a document author believes characterizes document.

Web search engines use the information provided with the meta element to categorize Web documents in their indices. So, if the author of a document seeks widespread exposure for the document, on or more meta elements are included to ensure that it will be found by at least some Web searches.

For example:

<meta name=”keywords” content=”binary trees, liked lists, stacks”/>

Comments: - Programmers are always encouraged to document their code through the use of comments. A programmer might create a working program today, see it used for months or years and then have to make changes to it. Many programming languages are fairly cryptic and if the program is complex even the original author can struggle to understand what the code is meant to do. Programming languages include a mechanism called the comment that lets developers write plain text inside their code files. This plain text is used to describe what the program does and, sometimes, how it works. It’s a good idea to add comments to your HTML files. Comment tags start with <! And end with >. Each comment contains as many lines of text as you like. If the comment runs over a number of lines, each must start and end with --. Software developers often place some comments which give:

The name of the application.

A description or the purpose of the code in the file.

The name of the author.

The original creation date.

The version number.

Copyright information.

We have so many tags available to use in real life. Sometimes we are not using these tags because of CSS which reduce the coding and increase the attraction over the webpage.

If you like our content please follow our blog and subscribe to our YouTube channel for interesting updates on programming languages. Thanks for visiting our site and comment your valuable feedback below.

Post a Comment

Previous Post Next Post