why there is nothing appears on chrome after coding with html? - 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>

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>

External stylesheet doesen't link

i am trying to link a stylesheet in another file. I've tried everything, copied it from multiple websites. But it doesen't seem to work. The css doesen't load any way. This is probably a really dumb mistake somewhere. Maybe it just needs another pair of eyes. The css works fine, what is causing problems is the link tag. What i noticed is, when i try to go to http://localhost:8080/styles.css it gives me Cannot GET /styles.css in plain text. I've tried modifying the permissions of the files, doesen't work. The filename is correct.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test zabezpečení prohlížeče</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<h1 id="page-title">Test zabezpečení prohlížeče</h1>
</body>
</html>

CSS external file doesn't make an effect

I am new in CSS so am practice it.
I wrote a css file and a html file in order to see the effect of external CSS file on my html page but no change observed.
Here my codes
style.css
p {
Color:red;
}
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset ="UTF-8">
<title>Css Syntax </title>
<link rel ="stylesheet" href="style.css" type="text/CSS">
</head>
<body>
<p>this is nirmal paragtne</p>
</body>
</html>
Your code seems to be working fine for me.. If it's in the same directory maybe you could try checking your filenames if there's no typing error?
I checked my code in firefox browser and it works fine

JSP unable to detect Bootstrap Spring MVC

I've been struggling for hours to include the Bootstrap CSS file into my file. My code snippet is as follows:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-
1">
<link rel="stylesheet"
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" type="text/css"> <!--Works fine now, but not with local path -->
<title>Welcome</title>
</head>
<body>
<section>
<div class="jumbotron">
<div class="container">
<h1> Hello </h1>
<p> world </p>
</div>
</div>
</section>
</body>
</html>
This works perfectly and the Bootstrap shows up just fine. However, I wish to include the localized files. The moment I change the link in the head of the code to <link rel="stylesheet" href="resources/bootstrap.css" type="text/css">, The bootstrap disappears.
Just to make sure and convince you that the bootstrap.css is indeed there at resources/bootstrap.css I included <%# include file="/resources/bootstrap.css"%> at the top of the code and it actually showed me the entire content of the file.
What am I missing? How do I resolve this?
If you have this project structure (I suggest trying this,because resource folder content is not used for static web contentnt ):
|_webapp
|_css
|_bootstrap.css
you can load the css by
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.css" type="text/css">

Using Komodo Edit, and trying to link HTML/CSS Files

I'm completely new at HTML/CSS.
I'm currently using a Mac and I don't know how to link HTML/CSS files in Komodo. Oddly enough, I cannot find anything online that explains how. Is there any one who can explain in DETAIL how to go about doing so?
You link a CSS file with a <link> tag in the <head> of your HTML file:
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
You can find more information from the HTML Dog: Applying CSS article.