$ ls ~yifei/notes/

html 的一些小知识和陷阱

Posted on:

Last modified:

如何自定义 favicon

<link rel="shortcut icon" type="image/png" href="/favicon.png"/>

html 中的空格

multiple spaces in html is displayed as one, to show multiple space

  1. use <pre> around the word
  2. use &nbsp;

Image lazy-loading

<img src="image.jpg" loading="lazy" alt="Alternative Text" />

Force download

<a href="path/to/file" download> Download </a>

© 2016-2022 Yifei Kong. Powered by ynotes

All contents are under the CC-BY-NC-SA license, if not otherwise specified.

Opinions expressed here are solely my own and do not express the views or opinions of my employer.