تسجيل الدخول | التسجيل | الأسئلة المتكررة
Anonymous

Syntax Error either in CSS or HTML

+ إضافة رد

2 مشاركة صفحة 1 من 1


Syntax Error either in CSS or HTML

بواسطة mmirbekian » الأربعاء مايو 09, 2018 7:50 pm

CODE: تحديد الكل
<!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.
CODE: تحديد الكل
<!-- 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