HTML / CSS examples (example source code) Organized by topic





Tags /

a background 6a.hover 20a.link 11a.text 2
a.visited 4a 43abbr 2acronym 3
Address 3Anchor class 37Anchor Email 5Anchor name 4
Anchor 27b 5base 2bdo 3
bgsound 3big 1blockquote 33body 56
br 5caption 34center 1cite 3
code 29comment 1dd 4del 7
dfn 3dir 1direction 3div background 31
div border 33div font 12div layout 44div margin padding 28
div table 6div text 6div 36dl 4
DOCTYPE 10dt 3em 3font 4
frame 14frameset 21head 2Header background 7
Header border 23Header color 15Header font 25Header margin 9
Header padding 8Header text 11Header 29height 1
hN 14hr 11html 13i 1
id 1iframe 8img align 7img border 5
img float 15img width 6img 55ins 4
kbd 3lang 1legend 1li background 6
li border 4li padding 4li.after 3li.before 10
li.counter 2li.first 3li.last 1li 56
listing 1marquee 2media 1menu 1
meta 17nobr 1noframes 1ol 19
p background 7p border 19p font 45p layout 24
p letter word 10p margin padding 20p text 36p.after 3
p.before 7p.content 5p.first letter 37p 32
plaintext 1pre 6q 14rt 1
ruby 1s 1samp 3small 1
spacer 2span align 10span font 12span text 17
span 54strike 1strong 12style 6
sub 4sup 4table background 7table border 44
table colgroup 7table cols 17table colspan 3table empty cell 6
table margin 7table rowspan 4table size 35table 56
tbody 2td align 13td background 9td border 23
td padding 11td text 10td 39text 1
tfoot 11th background 12th border 15th color 6
th font 6th padding 6th text 3th 21
title 2tr 20tt 2u 1
ul 34var 1wbr 1xmp 1

CSS /

important 1a.class 7accelerator 1active 1
background attachment 7background color 23background image 19background position x 1
background position y 1background position 78background repeat 19background 61
behavior 1border bottom color 2border bottom style 4border bottom width 2
border bottom 12border collapse 4border color 5border left color 1
border left style 4border left width 1border left 6border right color 1
border right style 4border right width 1border right 5border spacing 3
border style 31border top color 2border top style 4border top width 3
border top 22border width 28border 42bottom 13
caption side 1caption 2charset 1clear 12
clip 1color 11content attribute 3content section 10
content 9counter increment 6cursor 9direction 3
display 13empty cells 1filter 1first letter 1
first line 1float 26font face 1font family 28
font size 71font stretch 1font style 18font variant 3
font weight 19font 67hasLayout 1header.class 2
height 6hover 1ime mode 1import 1
input.class 1lang 1layout flow 1layout grid char 1
layout grid line 1layout grid mode 1layout grid type 1layout grid 1
left 15letter spacing 14line break 1line height 20
link 1list style image 5list style position 6list style type 37
list style 28margin bottom 13margin left 22margin right 20
margin top 10margin 76max height 6max width 4
media 4min height 3min width 4moz box sizing 1
opacity 1overflow x 1overflow y 1overflow 20
p.class 5padding bottom 2padding left 9padding right 3
padding top 4padding 28page break after 3page break before 2
page break inside 1page 1pixelBottom 1pixelHeight 1
pixelLeft 1pixelRight 1pixelTop 1pixelWidth 1
posBottom 1posHeight 1position 40posLeft 1
posRight 1posTop 1posWidth 1right 8
ruby align 1ruby overhang 1ruby position 1ScrollBarColorProperties 1
styleFloat 1table layout 15text align last 1text align 14
text autospace 1text decoration 26text indent 22text justify 1
text overflow 1text shadow 8text transform 13text underline position 1
textDecorationLineThrough 1textDecorationNone 1textDecorationOverline 1textDecorationUnderline 1
top 16unicode bidi 1vertical align 47visibility 6
visited 1white space 6width 55word break 1
word spacing 17word wrap 1writing mode 1z index 24
zoom 1

CSS Controls /

Banner 8Calendar 5Comment 21Crumb 2
CSS Button 16drop cap 12Flash page 1Footer 32
Image 17List menu 9Logic section 9Login Form 17
Logo 1Menu 79Navigation Bar 20Quotation 17
Round 7Seach box 17Section 23Siderbar 42
tab 31Title section 21Tooltips 3

Reference /

Color 19Entity Table 6URL encoding 6

Form /

accept 1acceptcharset 1accesskey 2action 1
autocomplete 1Button class 1button 53checkbox 11
cols 1encoding 1enctype 1fieldset 33
File upload 1Form Action 3Form CheckBox 4Form File Upload 1
Form Legend 1Form Password Field 2Form RadioButton 3Form Select 4
form tag 1Form TextField 5Form Validation 2form 48
Hidden controls 2Image input 1input 87isindex 1
label optgroup 1label option 1label 45legend 17
maxlength 1method 1multiple 1optgroup 1
option 5password field 5radio 8readonly 1
rows textarea 2scrollbar 1Search Box 2select 23
selected 1size 1tab order 1textarea 49
type button 1type input 1upload input 1value 1 1

Layout /

clear 9Container Layout 12fixed width layout 4float and position 26
float layout 25float 21footer 11Four Columns 13
Liquid Layout 4One Column 17position absolute 32position fixed 17
position float 1position relative 16Position Selector 4position static 13
position 5Size and Layout 48three Columns 48Two columns 36

Form /

accept 1acceptcharset 1accesskey 2action 1
autocomplete 1Button class 1button 53checkbox 11
cols 1encoding 1enctype 1fieldset 33
File upload 1Form Action 3Form CheckBox 4Form File Upload 1
Form Legend 1Form Password Field 2Form RadioButton 3Form Select 4
form tag 1Form TextField 5Form Validation 2form 48
Hidden controls 2Image input 1input 87isindex 1
label optgroup 1label option 1label 45legend 17
maxlength 1method 1multiple 1optgroup 1
option 5password field 5radio 8readonly 1
rows textarea 2scrollbar 1Search Box 2select 23
selected 1size 1tab order 1textarea 49
type button 1type input 1upload input 1value 1 1

Templates /

Animal 27Art 25Balloon 6Black 32
Blog 33Blue 82Book 5Brown 7
Burn 2Business 195Child 2City 12
Clear 27Cloud 5Coffee 13Color 18
Dark 26Dating 3Day Night 11Design 2 92
Design 3 151Design 4 117Design 5 125Design 6 114
Design 7 123Design 8 196Design 9 186Design 59
Dream 3Earth 4Effect 2 59Effect 64
Family 3Fashion 31Fire 1Flame 2
Flower 28Food 29Forest 5Fruit 8
Game 5Garden 14Gold 6Green 81
Grey 16Health 3Holiday 25Hotel 6
Ice 4Light 6Movie 3Music 17
Natural 64Orange 20Paper 4People 20
Photo 12Pink 12Purple 11Rain 2
Red 45Restaurant 4Round 4Sand 3
Sea 8Season 14Silver 4Simple 27
Sky 11Snow 4Sport 11Sun 24
Swan 3Technology 23Travel 9Tree 4
Vacation 4Water 17Wedding 2White 9
Wood 12Yellow 6

Object /

applet 1application 1archive 1class 1
classid 1code 1codebase 1codetype 1
data 1datafld 1dataformatas 1datapagesize 1
datasrc 1declare 1defer 1dynsrc 1
event 1hidden 1language 1noembed 1
noscript 1object tag 6param 2pluginspage 1
script 1src 2 1standby 1type embed 1
type param 1type style 1value 2 1valuetype 1
xml 1

Meta Tags /

DOCTYPE 1base 1basefont 1custom 1
embed 1link 1meta 1title 1

Style Basics /

attribute selector 14Block Elements 7Box Layout 27Box model Basics 28
Child Selector 5Class Selector 17color 17comments 2
CSS Basics 18cursor 3Element Selector 14em 8
entity 11Group Selector 2ID Selector 7import 3
important 6inherit 1Inheritance 14Inline Elements 14
Inline Style 3Level Selector 6measurement 32media 9
Pseudo Class 19rgb 6Selector priority 11selector 36
Sibling Selector 6Style file 1Style overwrite 8Tag Selector 2
url 3wild card 1

XML /

display 1element 2font 1list 4
table 3tag style 1

Microsoft Attributes /

begin 1end 1

IE Firefox /

khtml opacity 1 moz border 2 moz box sizing 1 moz opacity 1
moz selection 1filter 2IE 3opacity 1