1. Navigation: Unordered List vs. Other Label Elements <ul><li><a href="#">Collect and share</a></li></ul> 2. Path (breadcrumbs): p paragraph tag vs list list tag We can discuss this issue together, if you have other better ways please let us know. Personally, I prefer to write the path (breadcrumbs) as follows. (I don't use the >> symbol often, however). <p id="breadcrumbs"><a href="#">Home</a> » <a href="#">About Us</a> </p> The website path (breadcrumbs) has a hierarchical relationship in a certain page. Logically, lists should be nested to show the hierarchical relationship. But what do you think if there is only one item in your list? I personally feel that the web page path (breadcrumbs) should be displayed in one line. 3. Button to Input <button type="submit">Submit Form</button> 4. Message: Ordered list (ol) vs. unordered list (ul) <ol> <li> <ul> <li><img src="path-to-gravatar.gif" alt="Author's name" /></li> <li><a href="url-to-authors-homepage.html">Author's name</a></li> <li>posted on date-goes-here</li> </ul> <div>Comment text goes here...</div> </li> </ol> 5. label/input: div to other label elements <label for="contactName">Your Name</label> <input type="text" name="contactName" id="contactName" /> Using appropriate tag codes could have been discussed before, but now I have chosen to use div to embed label/input, and the label and its associated components are considered as a whole. The div element has a wide range of semantic properties and can be adapted to any situation. <div> <label for="contactName">Your Name</label> <input type="text" name="contactName" id="contactName" /> </div> Original Chinese text: My 5 HTML writing preferences |
<<: How to redirect PC address to mobile address in Vue
>>: How to solve the problem of blurry small icons on mobile devices
Database read-write separation is an essential an...
Effect picture (if you want a triangle, please cl...
Overview Binlog2sql is an open source MySQL Binlo...
Background Here's what happened, Luzhu accide...
1. Download MySQL Archive (decompressed version) ...
Table of contents Overview What is lazy loading? ...
Installation Environment Centos Environment Depen...
Mininet Mininet is a lightweight software defined...
View Docker Network docker network ls [root@maste...
Since I returned the Mac, my original laptop has ...
MySQL's foreign key constraint is used to est...
1. Space rules Whitespace within HTML code is usu...
privot is the intermediate table of many-to-many ...
Recently, Xiao Ming just bought a new Mac and wan...
The specific code is as follows: The html code is...