Article Title
This is an independent article block.
In HTML, elements are broadly divided into two categories: block-level and inline. Block elements take up the full width and always start on a new line, while inline elements only take as much space as needed and sit within a line of text.
[Block Elements] [Inline Elements] [Comparison]
Div is a block container used to group content.
This is a paragraph example.
The <p> tag defines a block of text that always starts on a new line.
Headings are block-level elements that take the full width.
Lists are block-level containers for items.
“Coding is the new literacy.”
Blockquote is a block container for quotations.
Before horizontal line
After horizontal line
<hr> draws a thematic break.
Col 1 | Col 2 |
---|---|
A | B |
Table is a block-level structure for tabular data.
Section groups content into thematic blocks.
This is an independent article block.
Article represents independent content.
Nav defines a block of navigation links.
This is highlighted with span inside text.
Span is an inline container with no new line.
Visit Example site.
Anchor creates hyperlinks and stays inline.
This word is bold inside a sentence.
B makes text bold but with no semantic meaning.
This word is italic inline.
I makes text italic for style.
This is underlined text.
U tag adds underline inline.
Warning: Do not share password.
Strong represents strong importance.
This word is emphasized.
Em adds emphasis, usually italics.
E = mc2 and H2O.
Sup shows superscript, sub shows subscript.
This is highlighted text.
Mark highlights text inline.
HTML is a markup language.
Abbr defines an abbreviation with a tooltip.
Use console.log("Hello")
in JavaScript.
Code represents inline code snippets.
Block Elements | Inline Elements |
---|---|
<div> | <span> |
<p> | <a> |
<h1> | <b> |
<ul> | <i> |
<blockquote> | <abbr> |
<table> | <code> |
<hr> | <sup> |
<section> | <mark> |