HTML syntax summary

Block vs. inline

Example 1

A div is a block element having the sole purpose of containing other elements (including other div's) for grouping them together logically. It as no other explicit semantic meaning. The block elements below are new to html5, and are like div's except that they have the implied semantic meanings as indicated.
A section represents a generic section of a document.
A header represents an introductory section of a document.
A article represents stand-alone content that can be separated from the rest of the document
A details represents additional details that can be displayed
A summary represents a document summary
A main should be used to contain the primary section(s) of a document, stripped of all headers, footers, asides, and details.
A dialog is used for dialog boxes
A figure is used to contain photos or other images
A figcaption is used to provide a figure's caption
A address is used to represent contact information

A block element is always displayed as if it had a linebreak before and after it, separated from surrounding text.

An inline element like this <span> is displayed in the flow of the surrounding content.

A block element cannot be nested within the start and end tags of an inline element - but inline elements can be nested within the start and end tags of a block element.

Example 2

Content within a pre block element, like

if( p->x() > 0 )

appears exactly as written, but separated from surrounding content.

Content within a code inline element, like if( p->x() > 0 ) appears exactly as written and inline.


Other inline elements

The em element indicates emphasized text.

This strong element indicates strongly emphasized text.

A mark indicates the presence of highlighted content

The abbr element indicates an abbreviation like FBI.

Use the cite element to cite a source like Wikipedia.

Use a dfn to indicate a definition: cruft - badly written code.

The samp is used to indicate sample output, like Abnormal Program Termination.

Use kbd to indicate a keyboard input, like rm -r *.

Use var to indicate a variable name like slkfjasdkjfa.

Use sup and sub for super- and sub-scripting, as in the Einstein Field Equation: Rab - 1/2 R gab = 8πG/c4 Tab

del and ins indicate deletedinserted text.

The br element
is used to explicitly
indicate a line break.

Here is an image:MSOE logo

Here is a link to the MSOE website.

Here is a image link to MSOE logo MSOE's website.