Mika H.
Mika H.

Reputation: 4339

Frameset not showing when text is added outside it

In the HTML code below, the frameset doesn't appear, but only the text "abc" appears. However, if the text "abc" is removed from the code, the frameset appears. I don't understand why that happens. Shouldn't the frameset appear below the text "abc"?

<html>
<head>

abc

<frameset border=0 cols="170,*">
<frame marginwidth=10 src="navigation.html" name="left" scrolling=auto>
</frameset>

</head>
</html>

Upvotes: 0

Views: 155

Answers (1)

Quentin
Quentin

Reputation: 944172

The document is invalid.

You can have either a <body> or <frameset>, not both. Any non-metadata text must appear in the <body> or <noframes> element.

So no, the frameset shouldn't appear below the abc. The abc tells the browser that this is a regular HTML document with regular content and not a frameset document.

Upvotes: 1

Related Questions