Keep in touch:rssrssrssrss


HTML Div Tag attributes

HTML | on Apr. 25, 2011 | by 0 Comments

HTML div tag is used to introduce styles to the text to make the text more appealing and readable by the users. Div elements include the title, class, ID, style and alignment. Whenever you are writing some text, it needs to have a heading or a title for the reader to know what they are reading. The title also allows the users to locate their subjects of interest with relative ease. Title or the heading can be introduced by specific tag <hn> which can use any on the six headings category.

Different parts of the site are aligned differently. For example, the title or the heading can be centre aligned while the rest of the text can be left, right or justify aligned. This allows the users to be able to distinguish between the different parts easing accessibility and use of the various parts of the site. The tag used here is <p align=”center”> which can be changed depending on the part. Other modifications that can be made using align are indenting a paragraph. The paragraph to be aligned is selected and the tag <p style=”margin-right: ’5%’; margin-left: ā€˜5 %’”> is introduced.

Style has to be introduced to the content element and includes the color, size and the font. It is important for the webmaster to style the text such that the readers are able to read through easily. Use colours that can be read by all people without a problem and avoid colours that cannot be read easily especially when they do not contrast well with the background. The colour of the background and that of the text and images should complement each other. The tag <color> is used to choose the specific color to be used.

The font of the text should be readable. You should not use calligraphic and related fonts for your site unless it is a special site. These fonts are not easy to read for some people and they may be frustrated. At the same time, the size of the text should be maintained standard, not too big or too small. The tagā€ <p style=”font: 16pt courier”> is used for the font and size of the text. Style can be used on different words, sentences, paragraphs and even several paragraphs. All you need to do is highlight the part you would like to style and then add the various styles like color, font, and size. This is especially important when you want to emphasize on a particular sentence, paragraph or part of the content.

Sometimes, the content you have written can only make sense when grouped in to distinct classes. The HTML div tag attribute class allows this and is associated with Cascading Style Sheets CSS in which different elements type are associated with their corresponding classes. The different element types that can be used with CSS include the family, weight, variant, height and style. The elements in the content can be classified into the different classes according to their varying characteristics. The class has ranges in which the different characters will fit into.

Leave Your Response

* Name, Email, Comment are Required