Zaloguj | Zarejestruj | FAQ
Anonymous

Syntax Error either in CSS or HTML

+ Odpowiedz

Posty: 2 Strona 1 z 1


Syntax Error either in CSS or HTML

przez mmirbekian » Śr maja 09, 2018 7:50 pm

Kod: Zaznacz cały
<!DOCTYPE html>
<html>

<style>
<!-- image container -->
.image .main {
    width:100%;
    position: fixed;
    z-index:-1;
    background-color:gray;
    text-align: center;
}
<!-- image -->
.image .main img {
   
    opacity: 0.8;
   
}
<!-- the shapes in top of page -->
.shapes{
   text-align: center;
}

<!-- the container for three blocks -->
.mom
{
   text-align: center;
}

<!-- three blocks -->
.container {
   background-color: rgba(255,255,255, 0.5);
   width: 400px;
   overflow: scroll;
   display: inline-block;
}
<!-- the single pre block -->
.display
{
  background-color: rgba(255,255,255, 0.5);
  max-width:163px;
  display: block;
}

<!-- the block quote at bottom of the page -->

blockquote {
    color: white;
}
</style>

<head>
  <title>Jared Gilmore is Lovely</title>
  <meta charset="UTF-8">
</head>

<body>

   <h1>Jared Gilmore</h1>

   <hr>
   <div class="shapes">
     <pre>&hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts;     &#9824;     &hearts; </pre>
    </div>
    <hr>


<pre>
  Jared Gilmore is amazing
    talented
     and amazing
</pre>



<div class="image main"> 
<img title="Jared Gilmore is happy!" src="..\images\DciZZIsXkAA1bYw.jpg" alt="Jared Gilmore with body guards"/>
</div>


<div class="mom">
<div class="container">
<h2>About Jared Gilmore </h2>
<h4>Personal life</h4>
<h4>Carrier Life</h4>
</div>
<div class="container">
<h2><mark>About Jared Gilmore</mark></h2>
<h4>Personal life</h4>
<h4>Carrier Life</h4>
</div>
<div class="container">
<h2>About Jared Gilmore </h2>
<h4>Personal life</h4>
<h4>Carrier Life</h4>
</div>
</div>

<br>


<pre class="display">
jhgbjjjbhm
mmmmkkkkkkkkkkkk
0kkkkkkkkkkkk
kkkkkkkkkkkk
kkkkkkbbbggyy
ydceddddddddddd
dddddddddddddd
dddddddddddd
ddddddddddddddddddd
ddddddddddddddd
dddddddd
ddddddddd
dddddddddddddd
ddddddddd
ddddddddddddddd
dddddddddddddd
dddddddddddddd
ddddddddddddddd
dddddddddddddddd
dddddddddddddd
ddddddddd
dddddddd
dddddddddddddd
dddddddd
dddddddd
dddddddddd
ddddddddddd
ddddddddddddd
ddddddddd
ddddddddddddd
ddddddddddddd
dddddddddddddddd
ddddddddddddddd
ddddddddddddddd
dddddddddddd
ddddddddddd
dddddddd
dddddd
</pre>


<blockquote>Creativity takes <abbr title="work hard for it">courage</abbr><br><cite>-Matisse</cite></blockquote>

</body>
</html>
Avatar użytkownika

mmirbekian

  • Posty: 1
  • Dołączył(a): Śr maja 09, 2018 7:47 pm

Re: Syntax Error either in CSS or HTML

przez meow » Pn maja 28, 2018 12:35 pm

The style block should be inside HEAD, not before it. You can put nothing between <html> and <head>,

You use HTML comments in your CSS.
Kod: Zaznacz cały
<!-- HTML comment -->
/* CSS comment */


Fix that and then use the validators to check if there are more errors.
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/
Avatar użytkownika

meow

  • Posty: 5
  • Dołączył(a): Cz maja 03, 2018 4:53 pm


+ Odpowiedz

Strona 1 z 1