HTML-Snippets
Eine Snippet-Sammlung für HTML.
Basis HTML
Siehe: Alles zum head
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head.
Any other head content must come *after* these tags. -->
<!-- Document Title -->
<title>Page Title</title>
<!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="favicon_32.png"/>
<!-- Base URL to use for all relative URLs contained within the document -->
<base href="https://example.com/page.html">
<!-- External CSS -->
<link rel="stylesheet" href="styles.css">
<!-- In-document CSS -->
<style>
/* ... */
</style>
</head>
<body>
...
<!-- JavaScript -->
<script src="script.js"></script>
</body>
<html>
SEO Meta-Tags
Details: Blog-Artikel auf link-seo.de
<head>
<meta name="keywords" content="keyword1, keyword2, keyword3">
<meta name="description" content="Lorem ipsum ...">
<meta name="robots" content="index,follow">
</head>
Social Media Meta-Tags
Details:
<head>
<meta property="og:type" content="website" />
<meta property="og:url" content="http://mypage.de/" />
<meta property="og:site_name" content="My Page" />
<meta property="og:image" content="http://mypage.de/perma/social_400x400.jpg" />
<meta property="og:title" content="My Page. And my slogan." />
<meta property="og:description" content="Lorem ipsum ..." />
<meta property="twitter:card" content="summary" />
<meta property="twitter:url" content="http://mypage.de/" />
<meta property="twitter:image" content="http://mypage.de/perma/social_400x400.jpg" />
<meta property="twitter:title" content="My Page. And my slogan." />
<meta property="twitter:description" content="Lorem ipsum ..." />
</head>
Forms
<form action="target/service" method="post">
<input name="some-text" type="text" size="30" maxlength="30"
value="Initial text" />
<input name="some-password" type="password" size="12"
maxlength="12" />
<textarea name="some-text" cols="40" rows="20" wrap="soft"
readonly="readonly">Initial text</textarea>
<!-- No auto-stuff on mobile devices -->
<input autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
<textarea autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false"></textarea>
<label>
<input type="checkbox" name="zutat" value="salami" checked>
Salami
</label>
<label>
<input type="radio" name="zutat" value="salami" checked>
Salami
</label>
</form>