Not only does the website reduce the cost of development and maintenance, but the code is also more semantic. However, it does not mean that the table has disappeared from now on. It is still used by many people as a necessity for data representation on web pages, such as personal information data lists, etc. In fact, using HTML dl, dt, and dd tags will save you more code and make the code more consistent with the semantics of the content. Of course, tables also have their use, that is, data tables with large amounts of data, but small data lists and forms can be completely avoided!
If you are still using traditional tables to create data lists, then please continue to see how using HTML dl, dt, and dd tags makes your work easier...
The data list code of a traditional table is shown below. We need to add a tr tag to each row, and then add a td tag to the title and data. Since the tags are td, if you want to add a style, you need to add a class attribute to each td.
Copy the code