This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| html_and_css [2019/02/11 00:41] 60.239.56.126 | html_and_css [2021/07/23 23:56] (current) admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | #html | + | #HTML | 
| - | ### add favicon to website | + | ## Basic | 
| + | - **Block elements vs inline elements.** https://www.w3schools.com/html/html_blocks.asp | ||
| + | - **Checkbox** https://www.tunnelsup.com/jquery-checkbox-checked-reading-and-setting/ | ||
| + | |||
| + | ## add favicon to website | ||
| ``` | ``` | ||
| <link rel="icon"  | <link rel="icon"  | ||
| Line 8: | Line 12: | ||
| ``` | ``` | ||
| - | ### insert html code from another file | + | |
| + | ## insert html code from another file | ||
| ref: https://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file | ref: https://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file | ||
| Line 56: | Line 61: | ||
| {{ ::html_to_js.zip |}} | {{ ::html_to_js.zip |}} | ||
| + | |||
| + | Solution 3. Use htm file and ```frameset``` | ||
| #CSS | #CSS | ||
| - | ###在html中使用external stylesheet:  | + | ##在html中使用external stylesheet:  | 
| ```<link rel="stylesheet" type="tex/css" href="LSstyle.css">``` | ```<link rel="stylesheet" type="tex/css" href="LSstyle.css">``` | ||
| - | ###不同的vhost共用stylesheet的方法:在每个vhost里面建立symbolic link | + | ##不同的vhost共用stylesheet的方法:在每个vhost里面建立symbolic link | 
| ```ln -s /home/wwwroot/LSstyle.css LSstyle.css```  | ```ln -s /home/wwwroot/LSstyle.css LSstyle.css```  | ||
| - | ###不同的开头: | + | ### Class vs ID: | 
| 1. define an **id**  | 1. define an **id**  | ||
| Line 76: | Line 83: | ||
| ```img.roundedCorner6px{ border-radius:6px; overflow:hidden; }``` | ```img.roundedCorner6px{ border-radius:6px; overflow:hidden; }``` | ||
| - | 两者似乎可以互相替换:[[https://www.w3schools.com/code/tryit.asp?filename=FYJD2ER45BQL]] | + | class可以用于各种元素,但id只针对一个元素:[[https://www.htmldog.com/guides/css/intermediate/classid/]] | 
| - | 但是class的定义方法必须得指定tag,不如id来得通用[?] ++++ Code Example| | + | |
| + | ++++ Code Example| | ||
| ``` | ``` | ||