HTML Code Examples
HTML stands for HyperText Markup Language. It's the language that enables us to build web pages.
This section of Code-Generator.net provides HTML code examples and HTML generators. An HTML code generator simply outputs HTML code based on your selection from an online form.
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
- Basic image example
- Linked image
- Image with border
- Responsive image
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 proseLink 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
Definition Lists
- Basic definition list
- Definition list with a
dfn
- Nested definition list
- Definition list with multiple terms
- Definition list with multiple definitions
HTML Articles
Background Code
- Background Codes
- Background Image Code
- Background Music Code
- Fixed Background Code
HTML Text
- Text Codes
- Text Color Codes
- Font Size
- Font Style Codes
- Marquee Codes (scrolling text)
HTML Colors
- HTML Color Picker
- HTML Color Chart
Other HTML Codes
- Border Codes
- Comment Box Codes
- Cursor Codes
- Email Code
- HTML Marquees
HTML Generators
- Music Code Generator
- HTML Table Generator
For more copy/paste codes, see the full list of examples, which includes CSS, JavaScript, jQuery, etc.