Sunday, 11.12.2016, 05:12
Welcome Guest
 
All Html Tags
<html>
<head>
<body>
<div>
<span>
<DOCTYPE>
<title>
<link>
<meta>
<style>
<p>
<h1-h6>
<strong>
<em>
<abbr>
<acronym>
<address>
<bdo>
<blockquote>
<cite>
<q>
<code>
<ins>
<del>
<dfn>
<kbd>
<pre>
<samp>
<var>
<br>
<img>
<area>
<map>
<object>
<param>
<form>
<input>
<textarea>
<select>
<option>
<optgroup>
<button>
<label>
<fieldset>
<legend>
<table>
<tr>
<td>
<th>
<tbody>
<thead>
<tfoot>
<col>
<colgroup>
<caption>
<ul>
<ol>
<li>
<dl>
<dt>
<dd>
<script>
<noscript>

Articles for Webmaster
:: Proffesional Website Builders
:: Div Tag in Html Examples
:: Notepad As a Free Html Editor
Authorization

Terms of Use <div> Tag

In HTML, the div elements are used where parts of a document cannot be semantically described by other HTML elements.

Most HTML elements carry semantic meaning – i.e. the element describes, and can be made to function according to, the type of data contained within. For example, a p element should contain a paragraph of text, while an h1 element should contain the highest-level header of the page; user agents should distinguish them accordingly. However, as div have no innate semantic meaning besides the logical grouping of the content, they can be used to specify non-standard presentation or behaviour without superfluous semantic meaning.

Div elements are used purely to imply a logical grouping of enclosed elements.
When they are labeled with class or id attributes, div elements can denote types of information otherwise indescribable with HTML. For example, <div id="author">John May</div> may be used to indicate the author's name in a document.

There are three main reasons to use div tags with class or id attributes:

- Styling with CSS
- Semantic clarity
- Access from code

The judicious use of div is a vital part of HTML and XHTML markup. However, the overuse of these elements, sometimes called divitis (a common mistake of not only beginners), is itself a minor form of tag soup.

Simple Example with Div Tag

<div style="background-color:blue;text-align:left">
  <p>Menu section</p>
</div>

<div style="border:2px solid black">
  <p>Content of your site</p>
</div>

See also

More information about div tag in html
Date: 30.09.2010
Reads: 39128 | Rating: 3.4/12
avatar
Search

Advertisement
Friends
superbwebsitebuilders.com
HtmlCodeExamples.Com © 2016