Skip to content

Instantly share code, notes, and snippets.

@killshot13
Last active June 3, 2021 05:58
Show Gist options
  • Select an option

  • Save killshot13/259584468f44b03a12307ec266b9948b to your computer and use it in GitHub Desktop.

Select an option

Save killshot13/259584468f44b03a12307ec266b9948b to your computer and use it in GitHub Desktop.
HTML Elements

block level elements

Based on the Mozilla Web Docs

block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).

The complete list of all HTML "block-level" elements (although block and inline elements are no longer defined in HTML 5, use content categories instead).

Note: "block-level" is not technically defined for elements new in HTML5.

<address> Contact information.

<article> Article content.

<aside> Aside content.

<blockquote> Long ("block") quotation.

<details> Disclosure widget.

<dialog> Dialog box.

<dd> Describes a term in a description list.

<div> Document division.

<dl> Description list.

<dt> Description list term.

<fieldset> Field set label.

<figcaption> Figure caption.

<figure> Groups media content with a caption (see<figcaption>.

<footer> Section or page footer.

<form> Input form.

<h1> <h2> <h3> <h4> <h5> <h6> Heading levels 1-6.

<header> Section or page header.

<hgroup> Groups header information.

<hr> Horizontal rule (dividing line).

<li> List item.

<main> Contains the central content unique to this document.

<nav> Contains navigation links.

<ol> Ordered list.

<p> Paragraph.

<pre> Preformatted text.

<section> Section of a web page.

<table> Table.

<ul> Unordered list.

inline HTML elements

Based on the Mozilla Web Docs

`An inline element does not start on a new line and only takes up as much width as necessary.

The complete list of all HTML elements which are inline by default.

The following elements are inline by default (although block and inline elements are no longer defined in HTML 5, use content categories instead):

<a> <abbr> <acronym> <audio>--(if it has visible controls) <b> <bdi> <bdo> <big> <br> <button> <canvas> <cite> <code> <data> <datalist> <del> <dfn> <em> <embed> <i> <iframe> <img> <input> <ins> <kbd> <label> <map> <mark> <meter> <noscript> <object> <output> <picture> <progress> <q> <ruby> <s> <samp> <script> <select> <slot> <small> <span> <strong> <sub> <sup> <svg> <template> <textarea> <time> <u> <tt> <var> <video> <wbr>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment