התחבר | הרשמה | שאלות נפוצות
Anonymous

Syntax Error either in CSS or HTML

+ פרסם תגובה

2 הודעות עמוד 1 מתוך 1


Syntax Error either in CSS or HTML

על ידי mmirbekian » ד' מאי 09, 2018 7:50 pm

קוד: בחר הכל
<!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>
סמל אישי של המשתמש

mmirbekian

  • הודעות: 1
  • הצטרף: ד' מאי 09, 2018 7:47 pm

Re: Syntax Error either in CSS or HTML

על ידי meow » ב' מאי 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.
קוד: בחר הכל
<!-- 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/
סמל אישי של המשתמש

meow

  • הודעות: 5
  • הצטרף: ה' מאי 03, 2018 4:53 pm


+ פרסם תגובה

עמוד 1 מתוך 1