---
title: "Is “<div/>” different from “<span style=”display:block“/>” ?"
author: "yuan"
date: "2011-05-19T23:07:36Z"
tags: []
categories: ["Web前端"]
slug: "is-div-different-from-span-style-display-block"
draft: false
lastmod: "2011-05-20T11:06:45Z"
id: 1050868
url: "https://yuan.iteye.com/blog/1050868"
---

**<http://stackoverflow.com/questions/1142104/is-div-different-from-span-style-displayblock>**


> **Greg** writes:
> 
> Yes they are different.
> 
> Even though you style a span with display: block you still can't put block-level elements inside it:
> 
> <div><p>correct</p></div>
> <span style="display: block;"><p>wrong</p></span>
> The (X)HTML still has to obey the (X)HTML DTD (whichever one you use), no matter how the CSS alters things.


然后：

**<http://www.w3schools.com/tags/tag_div.asp>
<http://www.w3schools.com/tags/tag_span.asp>**