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
Preface The essence of deadlock is resource compe...
Table of contents After creating a container loca...
Table of contents 1. Map accepts any type of key ...
This article shares the 6 most effective methods,...
Table of contents Preface 1. Less 2. Import your ...
Preface Using Docker and VS Code can optimize the...
1. overflow:hidden overflow hidden If overflow:hi...
Organize the MySQL 5.5 installation and configura...
Table of contents Preface JS Magic Number Storing...
Table of contents introduction Indexing principle...
Download Nginx image in Docker docker pull nginx ...
Table of contents 1. Live broadcast effect 2. Ste...
*******************Introduction to HTML language (...
Table of contents 1. Introduction to SQL Injectio...
nginx is our most commonly used server, often use...