为了后期自己查看或交流,有时需要在代码附近添加注释标签,注释标签里的文字不会显示到页面上,注释里的内容是写给程序猿看的。不过只需要在关键的地方添加注释即可。快捷键为ctrl+/。
例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>注释标签</title>
</head>
<body>
<h4>你看到的也许不是全部</h4>
<!-- 这是给程序猿看的哦!-->
</body>
</html>