Home
HTML ReferenceGeneric TagsThere are two types of tags used in HTML markup, block tags and inline tags. The browser puts a newline after block tags automatically. Text may wrap around a block tag. An inline tag, by contrast, exists within the text. There are many block and inline tags used in HTML markup that have various properties assigned to them by default. There are two that are particularly important because they have no default properties assigned to them. You can make these act however you like using CSS markup. divThe <div> tag is a generic block tag. CSS is applied to this tag in order to create an overall page layout. In this example, the div tag is given an id of "body" which would be used in CSS to position and define the presentation of the body of the web page. example use<div id="body">The web page body content.</div>spanThe <span> tag is a generic inline tag. CSS is applied to this tag in order to change the characteristics of inline content. For example, to make this word red I use the following: example use<span class="red">red</span>On the context style sheet page: .red {color: #ff0000} |
|