BoomBastic24
BoomBastic24

Reputation: 11

W3C validator error (Beginner at HTML5)

So I'm currently a beginner at HTML. I was writing a basic page but I was trying out a CSS file called hint.css.

I keep getting this validation error:

enter image description here

The Code:

<!DOCTYPE html>
<html lang="en">
  <link rel="stylesheet" href="hint.css" />
  <head>
    <meta charset="UTF-8"/>
    <title>First HTML learning page</title>
  </head>
  <body>
    <h2> HTML5, <span class="hint--bottom" aria-label="Web Dev!">Learning Page 
V1.</span></h2>
    <p>Using a combination of <span class="hint--bottom" aria-
label="HTML5,CSS3,JS,JQUERY,AJAX,PHP"><b>languages.</b></span>i will 
acomplish a dynamic web site</p>
  </body>
</html>

Upvotes: 0

Views: 58

Answers (3)

shakaib naqvi
shakaib naqvi

Reputation: 355

Your link is out of <head></headtag, put it inside the head tag like this

<!DOCTYPE html>
<html lang="en">

  <head>
    <link rel="stylesheet" href="hint.css" />
    <meta charset="UTF-8"/>
    <title>First HTML learning page</title>
  </head>
  <body>
    <h2> HTML5, <span class="hint--bottom" aria-label="Web Dev!">Learning Page 
V1.</span></h2>
    <p>Using a combination of <span class="hint--bottom" aria-
label="HTML5,CSS3,JS,JQUERY,AJAX,PHP"><b>languages.</b></span>i will 
acomplish a dynamic web site</p>
  </body>
</html>

Upvotes: 0

user8575507
user8575507

Reputation:

your link is in out of <head></head> tag , put it inside head tag and also

Upvotes: 0

corix010
corix010

Reputation: 571

As @Aaron K mentioned in comment, link tags for stylesheet must be inside head. Please try the following:

<head>
    <meta charset="UTF-8"/>
    <title>First HTML learning page</title>
    <link rel="stylesheet" href="hint.css" />
</head>

Upvotes: 2

Related Questions