These two tags are often used inter-changeably by developers for different reasons, so what are the differences between them? How should they be used to markup web pages?
You are currently browsing the XHTML help, using XHTML and CSS weblog archives for April, 2007.
One of the foundational elements on the web are links, or addresses to other web pages on the Internet. Links can be internal to your website or external, pointing toward some other resource on the web. Your basic link uses the tag <a>, for anchor, and it looks like this:
Often a designer will wish to have a section or paragraph title bar which contains two separate pieces of text displayed on one line. This may be a text title on the left and a date or time stamp on the right. This can be accomplished very cleanly with a few CSS attributes applied to [...]
Thereâ€™s pretty much one element you absolutely canâ€™t live without when marking up your pages. Itâ€™s the paragraph element. Youâ€™ll use this tag to mark, you guessed it, paragraphs. Hereâ€™s how: <p>This is my paragraph that isnâ€™t much of a paragraph. Arenâ€™t paragraphs 3-4 sentences long?</p>