HTML5 Starter Page - html

Is this the basic html5 bolier code?
<!doctype html>
` //do I still need this?
my title
<body>
//my body
</body>

The following stackoverflow answer shows the minimum required valid HTML5 document.
So yes you do need a <title> </title> after your <!doctype html> as a minimum.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
</head>
<body>
</body>
</html>
This, for me is

Yes, the title tag is necessary. This is the minimal valid html5 document you can use.
<!doctype html>
<title>I'm the shortest valid HTML5</title>

Related

href vs html tag when pointing to url

I'm just learning HTML and trying to figure out whether the tag after the doctype line in the code below should be html or href. I know that href should be used when referring to url's but also that because there is a closing bracket for </html>, therefore there should also be an opening <html>. Thanks.
<!DOCTYPE html>
< **html/href** xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>The Title</title>
</head>
<body>
.
.
</body>
</html>
Use it as shown below -
<html>
<head>
<title>MyWorl</title>
</head>
<body>
<a href="http://www.w3.org/1999/xhtml" >XHTML</a>
</body>
</html>

Html header element appears in body when using <DOCTYPE html>

I'm a beginner in web programming and I found out that when I have my header.php without the <DOCTYPE html> declaration in the beginning the html structure looks right as you can see here in a short example.
But when I modify the header.php and use the <DOCTYPE html>, the html structure changes to:
<html>
<head></head> <!-- empty head -->
<body>
<doctype html>
<title>Title</title>
"
context
"
</doctype>
</body>
</html>
Why is that?
Edit: This question is just the result of a basic typo mistake.
Apologies I didn't read through that properly and just adjusted the initial doctype.
Correction:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
</body>
</html>

how can i give a multilingual support to HTML page?

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="ar">
<body>
<p>بيـــان أعـــرف عميــــــلك</p>
</body>
</html>
I am getting this as my result : بيـــان أعـــر٠عميــــــلك
Can anyone help me?
Strangely, I can't repeat your results in my browser. Where do you get your results?
However, I think what Xufox suggests is a good practice, to set charset as utf-8 in you meta tag in header.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="ar">
<head>
<meta charset="utf-8"/>
</head>
<body>
<p>بيـــان أعـــرف عميــــــلك</p>
</body>
</html>

I uploaded my website and on of the tabs is in chinese

I uploaded my website and one of the tab(more info) is in chinese for some reason and I dont know why. here is the the url http://bushdid911.net
http://pastebin.com/jFBUV1ga
At very least, you should add
<meta charset="utf-8">
to the html's <head> section.
A (very, very) basic html template you should use is
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page title</title>
</head>
<body>
</body>
</html>
Another reason could be that Bush did this, too. Just to create another conspiracy theory..

Where can I view my title and meta tags?

I feel really stupid, but I can't for the life of me find my title or meta tags in my source code. It just starts out
<!DOCTYPE html>
<head>
.....
</head>
<body>
...
and then continues like that. I know my title is set, because it's displaying in my tab. This link (https://help.yahoo.com/kb/yahoo-web-hosting/SLN18260.html?impressions=true) tells me the meta tags should be right under the title. So where is the title??? I just want to make sure my meta tags are printing as expected.
UPDATE:
Weird, I just found them like halfway down the page, way outside my <head>. I don't know what they're doing there, but at least I found them.
This is the procedure,
<!DOCTYPE HTML>
<html>
<head>
<title>...</title>
<meta charset="UTF-8">
<meta name="keywords" content=".." /> //if needed
<meta name="description" content=".." /> //if needed
</head>
<body>
.....
</body>
</html>
The <title></title> should be inside the <head></head> block.
Code does not automatically generate tags. Thus, to create a title and meta tag, just initiate them below the head (following convention):
<!DOCTYPE html>
<head>
<title>My Website</title>
<meta charset="UTF-8">
</head>
<body>
</body>
a proper HTML structure should be like..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>My title</TITLE>
</HEAD>
<BODY>
......
</BODY>
</HTML>
HERE is the reference to get more ideas about HTML.