I cam accross this specific situation today. On a client's website, the pages had multiple tags, some even with conflicting Docty开发者_如何学Pythonpes: Ex:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>....</head></body>...</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>....</head></body>...</body>
</html>
All this within the same page.
Will this cause any issues, if so which ones ?
The problem that this will cause is that it is invalid HTML and it is indeterminate how the content will be rendered.
This is pretty much the standard "web" answer, but basically it depends on how the browser handles it. It's obviously not standards-compliant HTML so it would be good to avoid it.
apart from that it is plain ugly and non-standard, it has surely caused browser hickups in browser before, i dont know how the common browsers behave today.
i recall the day when one experimented with multiple body tags with different bgcolors to create a blinking background effect :)
精彩评论