Code

HTML5 download file code –

basic:

1
2
<a href="FILE-LOCATION/NAME.FILE-TYPE" download=""> some text here
</a>

new name:

1
2
<a href="FILE-LOCATION/NAME.FILE-TYPE" download="new-name-and-no-need-for-file-type"> some text here
</a>

clickable image:

1
2
<a href="FILE-LOCATION/NAME.FILE-TYPE" download="new-name-and-no-need-for-file-type"><img src="IMAGE-LOCATION/NAME.FILE-TYPE" alt="description-of-content-or-keywords-and-phrases" width="XXX" height="XXX" border="0" />
</a>

HTML5 responsive image code –

preserve aspect ratio:

1
<img style="max-width: 100%; height: auto;" src="IMAGE-LOCATION/NAME.FILE-TYPE" alt="description-of-content-or-keywords-and-phrases" />

fit to width of page or element:

1
<img style="height: choose a desired height and preferably in px; max-width: none; width: 100%;" src="IMAGE-LOCATION/NAME.FILE-TYPE" alt="description-of-content-or-keywords-and-phrases" />

CSS rounded images code –

1
.img-circle {border-radius: 50%;}
1
<img class="img-circle" src="FILE-LOCATION/NAME.FILE-TYPE">