HTML Cheat Sheet

A Programming › HTML cheat sheet in English by xys

html cheat sheet by yunshu

4,697 views 1,214 downloads 28 Dec 2020 History

basic format

<!doctype html> # for html5
<html>
<head>
# set chinese <meta charset="UTF-8">
<title>my title</title>
</head>

<body>
</body>
</html>
<he­ad>: add config inform­ation of website
- title and icon of web
- style
- SEO related info: keywords, descri­ption of web
- link external css/js files
- info about browser adaption

<bo­dy>: content to show to clients

<fo­rm> Nr.1

<form> Nr.1

<vi­deo>

<video>

<vi­deo> Nr.2

<video> Nr.2

<ma­rqu­ee>

<marquee>

basic tags

view possible attributes of labels
<h1>-<h6>
adding a header; one h1 in one page for better SEO
<p>
adding a paragraph
<hr>
horizontal rule: <hr>
<!-­-co­men­ts-­->
write comments; webstorm shortcuts: ctrl+/
<img src = "path/l­ink­ToImage" alt="altern­ateText" width= height= title=­"­">
adding a image
<br>
adding a break line
<a href="" target= title=­"­">text or <im­g> </a>
text or image with outgoing link
<base href="" target= > in <he­ad>
set base URL for all relative links and default target for all links in page
fake/p­lac­eholder URL
1. "­#": jump to top 2."j­ava­scr­ipt­:" don't jump at all
<a href="#­N5">­jum­p2N­5</­a>; <h2 id="­N5">­hel­lo<­/h2>
bookmark
<ul­><l­i>list item</­li>­</u­l>
Unordered list
<ol­><l­i>list item</­li>­</o­l>
ordered list
<dl­><d­t>d­efi­nition title<­/dt­><d­d>d­efi­nition descri­pti­on<­/dd­></­dl>
definition list
<ta­ble­><t­r><­td>­</t­d><­/tr­></­tab­le>
table

basic tag-Notes

basic tag-Notes

<fo­rm> Nr.2

<form> Nr.2

<fo­rm> Nr.3

<form> Nr.3
In the <fo­rm> tags, all tags except button tags can use value attribute to specify the data that needs to be submitted to the server

<au­dio>

<audio>

<de­tai­ls>

<details>

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.