Simple HTML not shown in Chrome - html

I have simple HTML file in my computer:
<html>
<body>
<head>
<title>Microsoft Corporation</title>
ddd
</head>
</body>
</html>
Google Chrome show it as not HTML page and includes some garbage:
<�html> <�body> <�head> <�title>Microsoft Corporation<�/title> ddd <�/head>
<�/body> <�/html>
THis is how it looks in notepad++:

<html>
<body>
<head>
<title>Microsoft Corporation</title>
</head>
<body>
ddd
</body>
</html>
You should have opened body of the html page then put your content in it.

Your html syntax is incorrect. Write the following sample html:
<html>
<head>
<title>My Site Title</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Save the file as index.html and then open the file using any browser. It will display "Hello World" on the window.

Related

Why does my html file not show up in Chrome?

So I started learning HTML today and the first file I coded does not come up in Chrome after being formatted. This is what the code looks like:
<!DOCTYPE html>
<html>
<head>
<title>Nikolay's Website</title>
</head>
<body>
</body>
</html>
And after I tried opening the file, which is of type "Chrome HTML Document" btw (thought it might help as info), it shows a blank page with no heading. Even if I remove the code and type "Hello World" it would still show a blank page in my browser.
HTML page should have the following default structure. Please refer this link https://www.w3schools.com/html/default.asp
<!DOCTYPE html>
<html>
<head>
<title>Nikolay's Website</title>
</head>
<body>
Hello World
</body>
</html>

How to write an inline script in your HTML file that prints your name to the dev tools console?

I was asked in an assignment to output my name to the dev tools console from my html file, can anyone help me with this?
You print to the console, using console.log(). This must be in JavaScript. In an HTML file, it might look like this:
<html>
<head>
<!--Your Head-->
</head>
<body>
<!--Your Body-->
</body>
<script>
console.log("My Name");
</script>
</html>
Just use console.log:
console.log("Your name");
We can use onload function on the body tag to execute an inline script
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
</head>
<body onload="console.log('Mohammed Fuhad')">
</body>
</html>

why there is nothing appears on chrome after coding with html?

I started learning HTML and CSS, I write an HTML code but the expected result is not appearing on chrome or internet explorer, I made sure that the code syntax is correct and the file saved with its name .html, everything appears normal and good with the code but why there is nothing appearing on chrome??
thank you.
This is a simple code that I'm trying to see on chrome.
<!DOCTYPE html>
<html>
<!-- HTML Project-->
<head>
<meta keywords="htmls, teach, learn" />
<link rel="stylesheet" type="text/css" href="style.css">
<title> HTML WEBSITE </title>
</head>
<body>
<div style="color : blue;">
THIS IS MY NEW WEBSITE
</div>
</body>
</html>

how do i run a .vbs file from a link in html

My folder looks like this Initial (folder\css,img,js,vbs,Main.html,Sub.html,sup.html)
I am supposed to link the .vbs script here and have it run from the file but it opens up a new window and shows the code from that file. I have tried script tags inside the link but it didn't work out very well.
My code looks like this:
<html>
<head>
</head>
<body>
Link
</body>
</html>
Use HTML like this
<!DOCTYPE html>
<html>
<head>
<script language="VBScript" type="text/vbscript" src="yourfile.vbs"></script>
</head>
<body>
</body>
</html>
Check this

how to disable filepath in titlebar of a html file

in html when the title is not mentioned
<html>
<head></head>
<body>
</body>
</html>
then IE automatically shows filepath of html page. How to disable this function.
And No i dont want to put a title element.
use a blank title
<title> </title>
<html>
<title>Text whtever you want/leave it blank </title>
<head></head>
<body>
</body>
</html>
parse the page and add it if it not included as said by alex