views:

43

answers:

2

I have created a website in VS 2008 (C#) that is using masterpages.

In the ASPX pages that are based off the masterpage I'm using the @ PAGE title directive to set the title of the genereated HTML page.

When I run the page on my development system the title displays correctly i nthe browser. However when I view the source code in the browser the tag is being broken into 3 lines.

<head><title>
My Page Title
</title>
...other meta tags...
</head>

That looks very strage to me. Is there something that I am doing wrong to cause the type of behavior? Will search engines look down on this syntax with the line breaks?

I'm expecting output like this:

<head>
<title>My Page Title</title>
...other meta tags...
</head>
A: 

This won't make much of a difference. You should be fine either way, and search engines are smart enough to not get confused only a new line or return. Just as long as the HTML isn't malformed, you should be alright.

Jonathan Sampson
+1  A: 

I've never seen that happen before, and I've used MasterPages and Page Titles a few times in the past year.

From an SEO perspective, search engines would ignore the line break in the title and only look at the actual characters between the open and close statements.

Alex
It's the default behavior. True, it won't matter from an SEO perspective, but it's bugging me... :)
pbz