Inline vs Block Element
Consecutive Inline Elements
An Inline Element will not have a line break after the tag. The song lyric below is a combination of Inline Elements. Consecutive inline elements will look like a run on sentence.
- Create a bold HTML tag
- Create a Span Tag.
- Create an Image Tag.
- Create an Italic Tag.
- Create a Hyperlink.
See the Pen Consecutive Inline Elements by jhoffmanbcc (@jhoffmanbcc) on CodePen.
Consecutive Block Elements
A Block Element will have a line break after each tag. The Cupcake Awakens movie manuscript below is a combination of Block Elements. Consecutive Block elements will have a space and a line break. They will look like a double spaced essay.
- Create an h6 tag.
- Create an h2 tag.
- Create a paragraph tag.
- Create a div called frosting.
- Add an h5 tag within the div called frosting.
See the Pen Consecutive Block Elements by jhoffmanbcc (@jhoffmanbcc) on CodePen.
Note: The example above did not link the div tag to CSS Properties. Default properties are displayed within the Div tag.
Inline Element nested within a Block Element + CSS Style Sheet
An Inline Element will make changes within the same line. The SPAN element is an inline element. Three words below have an inline property. Three words are given inline CSS Style Property and the style changes are displayed on the given line.
- Create a Paragraph Tag
- Create a Span Class
- Name the Span Class
- Close the Paragraph Tag
- Create a CSS Style Sheet
- Link HTML Span Element to CSS Style Sheet
- Add CSS Styles
See the Pen Inline + CSS by jhoffmanbcc (@jhoffmanbcc) on CodePen.