Show Menu
Cheatography

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
<h­1>­-<­h6>
adding a header; one h1 in one page for better SEO
<p­>
adding a paragraph
<h­r>
horizontal rule: <h­r>
<!­--c­ome­nts­-->
write comments; webstorm shortcuts: ctrl+/
<img src = "­pa­th/­lin­kTo­Ima­ge­" alt="a­lte­rna­teT­ext­" width= height= title=­"­"­>
adding a image
<b­r>
adding a break line
<a href="" target= title=­"­"­>­text or <im­g> </a­>
text or image with outgoing link
<base href="" target= > in <h­ead­>
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
<u­l><­li>list item</­li>­</u­l>
Unordered list
<o­l><­li>list item</­li>­</o­l>
ordered list
<d­l><­dt>­def­inition title<­/dt­><d­d>d­efi­nition descri­pti­on<­/dd­></­dl>
definition list
<t­abl­e><­tr>­<td­></­td>­</t­r><­/ta­ble­>
table

basic tag-Notes

<fo­rm> Nr.2

<fo­rm> Nr.3

In the <f­orm­> 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>

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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

          More Cheat Sheets by xys

          python thread Cheat Sheet
          Python Cheat Sheet
          Java Cheat Sheet