I have created this small file with HTML and style within the HTML sheet . The styles are not reflecting If i do it inline it is working.
<!DOCTYPE html>
<html>
<head>
<style>
{
p{color:red; background-color:blue;}
.textbox{background-color:green;
border-color: red;
border-width: 15px;
border-style: solid; }
}
</style>
<script src="C://Users//Karuna//Desktop//getValue.js"></script>
<body>
<p style="color:red;">New Text here</p>
<div ><input type="text" id="Mine" class="textbox"></div>
<div><button type=button id="btn">Hi There</button></div>
</body>
</head>
</html>
Your browser information:
Google Chrome
Version 89.0.4389.114 (Official Build) (64-bit)
Sky020
April 10, 2021, 11:58am
2
Welcome,
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).
Sky020
April 10, 2021, 11:59am
3
win.karunakamal:
</body>
</head>
Your head
element should not contain your body
/main HTML.
Hope this helps
win.karunakamal:
<style>
{
You have an unexpected character below your style
tag and like @Sky020 said your head
element should not contain your body
(or) main
HTML.
You do not need that set of curly braces around your css in the styles
element.
You also should not be wrapping everything in head
which is reserved for metadata.
system
Closed
October 10, 2021, 6:41am
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.