A newbie asks, is it better to use div or dl dt dd like this_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:19:15
Original
1157 people have browsed it


If you use div to do it, please give me the code. If you do it with dl dt dd, you don’t have to give it
Thank you


Reply to the discussion (solution)

No difference Bar. I would use ul instead

This is a practice question from a certain school

If you want me to write it like this, just add float to the div style

<div class="block">	<img src="pic01" /><span>打牌狂降价...</span></div>...
Copy after login

This, Use ul, which is more reasonable. . .

In fact, it can be achieved using any one, it depends on which one LZ is good at using.
I am not good at DIV either. I have done something similar before. I need to set the width and padding value of the parent div, as well as the small div, and then change the float attribute so that all are float: left. It seems that it can be achieved.
This is what I did, I wrote it before.

It is best not to use div, because div has no semantic meaning.

It cannot be generalized

Today’s browsers are not much different, but early browsers (such as ie5) used div instead of table to make a large table, and it was very difficult to open the browser

Don’t understand me wrong, I’m not asking you to consider compatibility with IE5
What I mean is that if it can be achieved, you can use anything, consider other aspects
1. Customer experience (opening speed, occupancy Memory)
2. Development efficiency (quick and simple), secondary development efficiency (especially if it is handed over to the next party for content editing)
3. Reusability (easy to modify)

<div><dl><dt>新品上架</dt><dd>内容</dd><dd></dd></dl></div>
Copy after login

Lists can be semanticized using list elements

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template