Semantic markup
common elements
What are these tags used for? What should they not be used for? What tags should be avoided?
- Headings [<h1>,<h2>,<h3>,<h4>,<h5>,<h6>]
- Lists [<ol>, <ul>, <dl> ]
- Text Containers [<blockquote>, <p>]
- Anchors [<a>]
inline elements vs block elements
-
Inline elements don't have line breaks before and after. Inline elements are used, within a block of text. The <strong> tag is an example of an inline element.
- examples: <strong>, <em>
- Block-level elements have a link break before and after and
are usually a block of text. Examples of these elements include the <p> tag,
heading tags are also included in this group.
- examples: <p>, headings
deprecated elements and attributes
- Depracated elements should not be used to style or format elements
- Common depracated elements include:
- Some depracated attributes include:
- align
- alink
- background
- bgcolor
- clear
- compact
- border
- hspace
- link
- noshade
- nowrap
- size
- text
- value
- vlink
- width
- vspace
Depracated |
Description |
Replacement |
|---|---|---|
<applet> |
Inserts applet |
<object> |
<b> |
Bolds element |
<strong> |
<basefont> |
Sets font styles |
Style sheets |
<center> |
Centers elements |
Style sheets |
<dir> |
Directory list |
<ul> |
<font> |
Applies font styles |
Style sheets |
<isindex> |
Adds search field |
<form> |
<menu> |
Menu list |
<ul> |
<s>, <strike> |
Strike through |
Style sheets |
<u> |
Underline |
Style sheets |