HTML - Cheat Sheet
HTML - Cheat Sheet
. taccess d
To os os atributos
Syntax Force HTTPS accept
form, input p
input, textarea
Div Y
<!DOCT PE html>
Tabela <a href="URL">clickable text</a>
<html lang="en">
accept-charset
form laceholder
video
<tag attributename="value" /> Creates a hyperlink to a Uniform Resource Locator
{ }
RewriteCond % HTTPS !on
<title>Page Title</title>
<tr>
* { } {
RewriteRule (. ) https://% HTTP_HOST % REQUEST_URI } action
form preload
command
Títulos Global attributes <a name="NAME">
align
applet, caption, col, colgroup, hr, iframe, img, table, tbody, radiogroup
input, textarea
<meta name="description" content="Roughly 155 characters">
<th>Name</th>
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</tr>
<h2>Subheading</h2>
style="color: red;" tabindex="0" title="Tooltip"
Creates a link to that target location async
script rel
input, select, textarea
<script src="script.js"></script>
</thead>
<h3>Tertiary heading</h3>
<tbody>
contenteditable="true" spellcheck="true"
RewriteEngine on
autocomplete
form, input required
ol
</head>
<h4>Quaternary heading</h4>
<body>
<tr>
data-htmlcheat="99">Hello World!</div> { }^
RewriteCond % HTTP_HOST htmlg .com NC \ [ ]
autofocus
button, input, keygen, select, textarea reversed
textarea
<!-- Content -->
<td>John</td>
^ *$ $ [
RewriteRule (. ) http://www.htmlg.com/ 1 L,R=301,NC ] autoplay
audio, video rows
td, th
autosave
input rowspan
ifram
</html> <td>577855</td>
Internacionalização Force non-www
<p style="text-align: center;">text</p> </tr>
<tr>
buffered
body,
audio,
col, colgroup, marquee, table, tbody, tfoot, td, th, tr
video
sandbox
selected
option
input, select
<td>Jack</td>
RewriteEngine on
Image m <td>577856</td>
<html lang="en-US">
{ }^ \
RewriteCond % HTTP_HOST www .htmlg .com NC \ [ ]
challenge
keygen size
Global attribute
<td>577857</td>
...
^ *$ $ [
RewriteRule (. ) http://htmlg.com/ 1 L,R=301 ] charset
meta, script slot
col, colgroup
<img src="/demo.jpg" alt="description" height="48" width="100" />
</tbody>
...
Define um formulário
checked
command, input span
Global attribute
</html>
<select multiple name=? size=?> </select>
Página de erros customizada cite
blockquote, del, ins, q spellcheck
audio, embed, iframe, img, input, script, source,
<tfoot>
Link de meail
Cria um select, um input com várias opções
class
Global attribute src
track, video
<tr>
<td> </td>
ErrorDocument 500 "Sorry, something went wrong!"
code
applet ol
<a href="mailto:[email protected]?Subject=Hi%20mate" target="_top">Send <header>
<a
Item usado dentro do select
<td>Personal</td>
ErrorDocument 401 https://htmlg.com/404/
Mail</a>
<div id="logo">HTML</div>
href="https://htmlg.com/"
<textarea name=? cols="x" rows="y"></textarea>
codebase
applet start
input
<td>Office</td>
ErrorDocument 404 404error.html
<nav>
target="_blank"
Cria um input com mais de uma linha para escrever textos maiores
</tfoot>
cols
textarea style
Global attribute
<strong>Bold text</strong>
<li><a href="/">Home</a></li>
hreflang="en"
Cria um input do tipo checkbox
Redirecionar site completo
</table> colspan
td, th tabindex
a, area, base, form
<li><a href="/link">Page</a></li>
type="text/html"
<input type="checkbox" name=? value=? checked>
</ul>
>
Cria um checkbox que já está marcado por padrão
content
meta target
Global attribute
Texto italico Redirect 301 / https://htmlg.com/
</nav>
Link
<input type="radio" name=? value=?>
style, menu
<main role="main">
<input type="radio" name=? value=? checked>
Redirect permanente
<ul>
<article>
Cria um radio button que já está marcado por padrão
controls
audio, video img, input, object
<li>First</li>
<li>Second</li>
coords
area usemap
button, option, input, li, meter, progress, param
<p>Content 1</p>
Cria um input de texto de apenas uma linha
Redirect 301 /oldlink https://htmlg.com/about/
<li>Third</li>
Image data
object value
canvas, embed, iframe, img, input, object, video
<span style="text-decoration: underline;">Underlined text</span> </article>
<input type="submit" value=?>
</ul>
<article>
src, alt, heigt, ismap, longdesc, src, srcset, usemap, width Cria um botão de envio para o formulário data-*
Global attribute width
textare
<h2>Title 2</h2>
Alias Directory
datetime
del, ins, time wrap
track
Iframe
<p>Content 2</p>
</article>
Listas de definição <img src="/demo.jpg" alt="description" height="48" width="100" longdesc="desc.txt" />
RewriteEngine On
default
track kind
track
<iframe src="link.html" width="200" height="200"> </iframe> ^ * $
Formatação
</main>
RewriteRule source_directory/(. ) target_directory/ 1 defer
script label
Global attribute
<section>A group of related content</section>
<dl>
dir
Global attribute lang
script
<aside>Sidebar</aside>
<dt>HTML</dt>
Listas
<footer>
download
a, area low
html
Comentário <br>
Deny from 123.123.123.123
<ul> </ul>
Insere uma linha em branco
Deny from 123.123.123.123
draggable
Global attribute manifest
input, meter, progress
<!-- HTML Comment --> Formulário Cria uma lista sem order
<blockquote> </blockquote>
dropzone
Global attribut max
input, textarea
<ol> </ol>
Insere o conteúdo entre um bloco com uma linha vertical estilo quote
Open Graph
<form action="/action.php" method="post">
Cria uma lista ordenada
Permitir acesso apenas de um IP enctype
form, input maxlength
a, area, link, source, style
<div> </div>
<hr />
form
Global attribute method
input, meter
<select name="gender">
<dl> </dl>
Cria um bloco inline para ser formatado com CSS # Require ip 123.123.123.123
Cria uma lista definida
formaction
form min
input, select
<option selected="selected" value="male">Male</option>
<option value="female">Female</option>
<dt>
headers
applet, caption, col, colgroup, hr, iframe, img, table, tbody, multiple
video
Quebra de linha <!doctype html>
</select>
Precede cada termo de definição
td, tfoot , th, thead, tr
, altapplet, area, img, input muted
button, form, fieldset, iframe, input, keygen, object,
<html xmlns:og="http://ogp.me/ns#">
<head>
height
canvas, embed, iframe, img, input, object, video name
Elementos gráficos
<meta property="og:url" content="https://htmlcheatsheet.com/" />
a, area, meter
<q>Success is a journey not a destination.</q>
</form>
<meta property="og:image" content="https://htmlcheatsheet.com/demo.jpg" /> hreflang
a, area, link optimum
<blockquote cite="https://ruwix.com/">
input
The Rubik's Cube is the World’s best selling puzzle toy.
http-equiv
meta pattern
a, area
</blockquote>
Meta tags opcionais icon
command ping
<hr>
<hr size=?>
id
integrity
Global attribute
link, script
<meta property="og:description" content="A brief description" />
<hr width=?>
controls>
<meta property="og:locale" content="en_US" />
Example
itemprop
Global attribute
Define o tamanho horizontal da linha
No video support.
<img src="URL" />
Adiciona uma imagem, onde src é o endereço da imagem (URL)
User-agent: *
Alinhar uma imagem (left/right/center/bottom/top/middle)
<audio controls>
Disallow: / <img src="URL" border=?>
No audio support.
Seta o tamanho vertical de uma imagem
Seta o texto que será exibido para dispositivos que não leem imagens