Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last year.
Improve this question
Hello i was trying to create a navbar and a red box below it. But red box came in the navbar .
I used css and html only . I have also provided the before and after of the outcomes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>
<div class="bar">
<img src="background.png" class="pic">
<nav>
<ul class="navlist">
<li>Search</li>
<li>Browse</li>
<li>Tags</li>
<li>Filter</li>
<li>Dev</li>
</ul>
</nav>
<div class="signin"><a href="#" class='sign'>Sign In</a</div>
</div>
<div class="introbox">abcd</div>
</body>
</html>
Add the closing bracket of the anchor element
<div class="signin"><a href="#" class='sign'>Sign In</a></div>
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 months ago.
Improve this question
I don't understand why it's giving me this error:
Error: Start tag body seen but an element of the same type was already open.
I don't see why this is happening, because it works when I load the site on my browser.
Here's my code:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Globo.com</title>
<link rel="stylesheet" href="reset.css">
<link rel="stylesheet" href="style.css">
</head>
<header>
<img class="quadrados" src="https://via.placeholder.com/44" alt="">
<h1 class="menu">Menu</h1>
<h1 class="email">Email V</h1>
<h1 class="titulo">Globo.com</h1>
<img class="lupa" src="https://via.placeholder.com/44" alt="">
<h1 class="busca">Busca</h1>
<img class="boneco" src="https://via.placeholder.com/44" alt="">
<h1 class="conta">Conta Globo</h1>
</header>
<header class="pequenos">
<h1>g1</h1>
<h1>o globo</h1>
<h1>valor</h1>
<h1>ge</h1>
<h1>cartola</h1>
<h1>globoplay</h1>
<h1>dropz</h1>
<h1>gshow</h1>
<h1>quem</h1>
<h1>receitas</h1>
</header>
<body>
<h2>Vacinação de Jovens</h2>
</body>
</html>
You are using the header tag outside of your body. In order to have valid HTML page, all elements such as divs, nav, header etc.. should be placed inside the body tag. Hence your HTML code is invalid according to the W3 validator.
The following code should be valid according to the W3 Validator. Note the order the code has been written:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Globo.com</title>
<link rel="stylesheet" href="reset.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<img class="quadrados" src="https://via.placeholder.com/44" alt="">
<h1 class="menu">Menu</h1>
<h1 class="email">Email V</h1>
<h1 class="titulo">Globo.com</h1>
<img class="lupa" src="https://via.placeholder.com/44" alt="">
<h1 class="busca">Busca</h1>
<img class="boneco" src="https://via.placeholder.com/44" alt="">
<h1 class="conta">Conta Globo</h1>
</header>
<header class="pequenos">
<h1>g1</h1>
<h1>o globo</h1>
<h1>valor</h1>
<h1>ge</h1>
<h1>cartola</h1>
<h1>globoplay</h1>
<h1>dropz</h1>
<h1>gshow</h1>
<h1>quem</h1>
<h1>receitas</h1>
</header>
<h2>Vacinação de Jovens</h2>
</body>
</html>
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 months ago.
Improve this question
My picture is not displayed. I've tried several browsers and different image formats. Unfortunately it doesn't always show up for me.
<!DOCTYPE html>
<html lang="en ">
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<img scr = "image.png">
</body>
</html>
You need to open your body tag
and the image needs a src attribute, not scr https://www.w3schools.com/tags/att_img_src.asp
<!DOCTYPE html>
<html lang="en ">
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<body>
<img src="image.png">
</body>
</html>
Change scr to src in the img tag.
Also put it properly inside a body tag.
Something like this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<body>
<img src="image.png" />
</body>
</html>
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I have made a site using css and html and in the main body underneath my nav bar whenever I try and make a normal paragraph, everything within the paragraph becomes a link to the contact.html webpage!!
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ace Moldels</title>
<meta name="description" content=“A website that sells radio controlled model cars" />
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="head">
<div class="header_content">
<center><img src="images/pic1.jpg"></center>
<div class="nav">
<ul>
<li><a href="index.html">HOME</li>
<li><a href="cars.html">CARS</li>
<li><a href="boats.html">BOATS</li>
<li><a href="about.html">ABOUT</li>
<li><a href="contact.html">CONTACT</li>
</ul>
</div>
</div>
<div class="headerbreak"></div>
</div>
<p> Greetings hello there</p>
<p> Greetings hello there</p>
You need to close the <a href="..."> tags:
<li>HOME</li>
<li>CARS</li>
<li>BOATS</li>
<li>ABOUT</li>
<li>CONTACT</li>
Close the anchor tags.
Example:
Text of the link
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last year.
Improve this question
I started a project to learn HTML, CSS and JavaScript and coded a full HTML page but my navigator doesn't load images, FontAwesome icons, and it doesn't apply my css file (tried on Brave and Microsoft Edge navigator).
I removed the most part of the code, I just left the CSS and header of my code - Any ideas of what is causing me trouble?
* {
box-sizing: border-box;
font-family: 'Raleway', sans-serif;
background-color: #F2F2F2;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght#100&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/#fortawesome/fontawesome-free#5.15.4/css/fontawesome.min.css" integrity="sha384-jLKHWM3JRmfMU0A5x5AkjWkw/EYfGUAGagvnfryNV3F9VqM98XiIH7VBGVoxVSc7" crossorigin="anonymous">
<link href="/css/style.css">
<link href="/css/normalize.css">
<title>Booki</title>
<nav>
<a class="nav" href="#">Hébergement</a>
<a class="nav" href="#">Activités</a>
<nav>
<img src="/assets/logo/Booki.png">
</head>
</html>
UPDATE:
I found how to display the path wasn't correct,i just need to remove the slash at the start of the path, and it works !
Use body tag to render your content on the page
<!DOCTYPE html>
<html>
<head>
...
<title>Booki</title>
</head>
<body>
<nav>
<a class="nav" href="#">Hébergement</a>
<a class="nav" href="#">Activités</a>
<nav>
<img src="/assets/logo/Booki.png">
</body>
</html>
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
<! DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="nav">
<div class="container">
<ul class="pull-left">
<li>ONE</li>
<li>TWO</li>
</ul>
<ul class="pull-right">
<li>LOG IN</li>
<li>HELP</li>
</ul>
</div> <!--End nav container-->
</div> <!--End nav-->
</body>
</html>
As of right now the list is displaying at the default way HTML displays lists. the second link to a main.css is just a blank file I am not doing anything in it. These files are structured as such:
Documents/Web
There are both in my web folder.
You're swapping btn with bnt, which won't render.
Try:
<body>
<div class = "container">
<form>
<button class="btn btn-primary"> My Button </button>
</form>
</div>
</body>
You can see the result here: http://jsfiddle.net/YuURs/