Show Menu
Cheatography

HTML Cheat Sheet by

html cheat sheet by yunshu

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

<vi­deo>

<vi­deo> Nr.2

<ma­rqu­ee>

 

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

<fo­rm> Nr.2

<fo­rm> 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>

<de­tai­ls>

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Five ways to center DIV element in CSS Cheat Sheet

          More Cheat Sheets by xys

          python thread Cheat Sheet
          Python Cheat Sheet
          Java Cheat Sheet