HTML Examples
This page contains HTML examples — examples of basic HTML elements that you can use for your own website.
Forms
- Basic form example (with no styles)
- Form with top-aligned labels
- Form with left-aligned labels
- Form with right-aligned labels
- Inline form
- Accessible compact form
- Bootstrap form using grid system
- Bootstrap form with validation styles & feedback icons
Form Elements
button
textarea
select
select
withsize
attributeselect
with multiple items able to be selecteddatalist
fieldset
output
progress
meter
input type="hidden"
input type="text"
input type="color"
input type="number"
input type="range"
input type="date"
input type="search"
input type="tel"
input type="url"
input type="email"
input type="password"
input type="date"
input type="month"
input type="week"
input type="time"
input type="datetime-local"
input type="checkbox"
input type="radio"
input type="file"
input type="submit"
input type="image"
input type="reset"
input type="button"
Image Examples
Table Examples
- Basic table
- Table with
thead
,tbody
, andtfoot
- Table with border
- Table with alternating colors
- Table with border and alternating colors
- Table with
colspan
- Table with
rowspan
- Table with
colgroup
- Table with
colgroup
andcol
Text Examples
b
for bold textblockquote
for quotes from another sourcebr
for line breakscite
for citationscode
for codedfn
for defining instance of a termdel
for deleted textem
for stress emphasish1
-h6
for headingsi
for text in an alternate voice or moodins
for inserted Textkbd
for keyboard Textp
for paragraphspre
for preformatted Textsmall
for small print, side comments, etcq
for single-line quotes from another Sourcesamp
for sample output from a computer programvar
for a variable within the prose
Link Examples
- Basic link
- Email link
- Email link with subject line
- "Nofollow" link
- Open link in new window
- Open link in a named window
- Link an image
- Link with hover effect
List Examples
Unordered Lists
- Basic unordered list
- Nested unordered lists
- Unordered list with square bullets
- Unordered list with circle bullets
- Unordered list with image bullets
Ordered Lists
- Basic ordered list
- Nested ordered list
- Ordered list with lowercase latin characters
- Ordered list with uppercase latin characters
- Ordered list with lowercase roman numerals
- Ordered list with uppercase roman numerals
- Ordered list with lowercase Greek characters
- More List Types