skip to contentstylized crane logoWhite Crane Education

Block Tags

Texts tags come in two types: block and inline. Block tags, e.g. the p (paragraph) tags that enclose this paragraph, occupty an entire "block" of text. This means that when the end of the section is reached the browser is required to move to the next free line before displaying the next block of XHTML. You can think of block tags as automatically adding a carriage return after the closing tag. (This is the same affect as typing the Enter key at the end of a paragraph in a word processor.)

Inline tags are used to enclose text within a line. For example this text, document.write, is enclosed in <code> tags. When the closing tag is reached the browser continues to display the following text on the same line.