Searching for easy header code to put...

User 2401193 Photo


Registered User
104 posts

Without anyone sending me to the w3schools, where I will only end up tearing my hair out, :o LOL can someone please provide a very easy header code, so that I can place just the title into my website?
Would this code below be the correct code, or am I missing something? Any help is greatly appreciated. thanks!

<html>
<head>
<title>Title of the document</title>
</head>
User 2147626 Photo


Ambassador
2,958 posts

Yes, that would work. On most sites it's common practice to include the DOC TYPE such as:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> before the <head>

But if all you want is your title, then what you have works.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2401193 Photo


Registered User
104 posts

Thanks Gunsmoke (BTW I love the name!). can you tell me what the advantage would be to add the DOC code and would I do it exactly as you have provided? I'm not sure where I would put my title in then(?)
User 2147626 Photo


Ambassador
2,958 posts

Definition and Usage

The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.

The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

You can get more information here... http://www.w3schools.com/tags/tag_doctype.asp

I know you didn't want to hear that :D
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2147626 Photo


Ambassador
2,958 posts

Your document would then look like this...

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2401193 Photo


Registered User
104 posts

Thank you once again. I initially tried my very oversimplified version and guess what? Coffee cup put the Doc file in there automatically! The less coding I have to do, the less dangerous I become, LOL. Thanks so much for the help. I always say that this site has some of the nicest people on it. I now have you to include on that list! Have a great week.:) Thanks again.
User 2147626 Photo


Ambassador
2,958 posts

Glad to help. Let us know if you have any other problems. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 38401 Photo


Senior Advisor
10,951 posts

I would imagine that VSD already sets up sites for doc types, and it's not set up for using html5 so I wouldn't go that way at this time. I could be wrong in that it might use it and just doesn't create it though lol. Either way I'm very sure it will create the doc types and the titles for you, I don't "think" you need to do that by hand with code, maybe just to be able to get to the area to edit it?
User 464893 Photo


Ambassador
1,611 posts

The title is added when the page is created, part of the system. It can be changed at any time as with meta information. There is not much you cannot do with VSD. If you look at the structured code it produces. Not responsive(yet ;)) but real neat. Also quite modifiable albeit not re editable in VSD.

The Guy from OZ


User 187934 Photo


Senior Advisor
20,271 posts

If your building a custom html page to handle some custom script the you'll add to VSD using an Iframe then the HTML page code will be useful but otherwise let VSD do all the heavy lifting.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.