<!DOCTYPE html>
<html>
<head>
<meta charset=“UTF-8” />
<title>Footer Design</title>
<link rel=“stylesheet” type=“text/css” href=“style.css” />
</head>
<body>
<div id=“footer”>
<div id=“footer-col-one”>
<h3>Categories</h3>
<ul>
<li>Snow</li>
<li>Surf</li>
<li>Travel</li>
</ul>
</div>
<div id=“footer-col-two”>
<h3>Navigation</h3>
<ul>
<li>Home</li>
<li>About</li>
</ul>
</div>
<div id=“footer-col-three”>
<h3>Follow Me</h3>
<ul>
<li>Facebook</li>
<li>Twitter</li>
<li>Instagram</li>
</ul>
</div>
</div>
</body>
</html>
For some reason I cannot get my CSS stylesheet to apply. It's not the same directory as this html file. I'm using TextEdit and set it up for use with html & css. I did notice that any where I had double quotes I'm getting some weird output on Chrome Developer Tools like the following:
<link rel=“stylesheet†type=“text/css†href=“style.css†/>
You can't delimit HTML attribute values with “ characters, you must use " or '.
Left/Right quotes will be treated as part of the value (and thus the URL) and not as HTML special characters.
Your problem is most likely caused by writing code using a Word Processor with Smart Quotes turned on. Use a text editor (I'm fond of Sublime Edit 2 myself, but there are many other excellent choices such as Komodo Edit and Brackets).
This would have been picked up (albeit not explicitly) had you used a validator.
Please use this source formatting .Do not use “ . Use " . If your style.css file is in the other location means suppose that style.css is in the css folder so give the path like href="css/style.css"
Hope the answer and use this below html code which I have modified!
Footer Design
<body>
<div id="footer">
<div id="footer-col-one">
<h3>Categories</h3>
<ul>
<li>Snow</li>
<li>Surf</li>
<li>Travel</li>
</ul>
</div>
<div id="footer-col-two">
<h3>Navigation</h3>
<ul>
<li>Home</li>
<li>About</li>
</ul>
</div>
<div id="footer-col-three">
<h3>Follow Me</h3>
<ul>
<li>Facebook</li>
<li>Twitter</li>
<li>Instagram</li>
</ul>
</div>
</div>
</body>
</html>
Related
<a href="Services.html">
<button type="button"class="btn">Book Now!</button>
<div id="contact">
<p> <b> Contact us: </b> CapitalExplorers#Wellington.com</p>
</div>
</body>
Trying to find out what is causing the </body> to be red. I believe it has something to do with the <a href part but not sure. Any ideas on a potential fix?
Remember to close your tag:
<head>
...
</head>
You're missing the closing tag of the first list.
<body>
<ul id="navigation">
<li>FAQ</li>
<li>Bookings</li>
<li> Services </li>
<li>Home</li>
</ul> <!-- Include here a closing tag -->
The <a> tag also needs to be closed.
<a href="Services.html">
<button type="button"class="btn">Book Now!</button>
</a> <!-- For example, if you want the link only in the button (even if it is not a good practice) -->
<div id="contact">
<p><b>Contact us:</b> CapitalExplorers#Wellington.com</p>
</div>
</body>
looking at the provided snippet. i think this is what your html should look like. added some closing tags and removed some spaces.
<!DOCTYPE html>
<html>
<head>
<title>Capital Explorers- Home</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Arvo:wght#700&family=Chelsea+Market&family=IBM+Plex+Sans:wght#400;600&family=Lato:wght#300&family=Roboto&display=swap" rel="stylesheet">
</head>
<body>
<ul id="navigation">
<li>FAQ</li>
<li>Bookings</li>
<li> Services </li>
<li>Home</li>
</ul>
<h1>Capital <span> Explorers </span></h1>
<div id="header">
<h2>Explore Wellington.</h2>
</div>
<div id="paragraph">
<p> At Capital Explorers, our mission is to provide Fun, Adventurous and <span> Eco-friendly </span> Tours of Wellington City and beyond.
</p>
</div>
<div id="SubPara">
<p> <b>- Maori</b> culture and history, Te Papa, The Cable Car and many more!
<br>
<b>- Travel on</b> foot, with scooters or bicycles, and also electric vehicles.
<br>
<b> - Family </b> owned and operated, with over 15 years of experience in the tourism industry.
<button type="button"class="btn">Book Now!</button>
</div>
<div id="contact">
<p> <b> Contact us:</b> CapitalExplorers#Wellington.com</p>
</div>
</body>
</html>
I recently started to learn CSS and HTML and I am doing a front page for exercise. However, the browser is overriding and turning my other elements (in different div) into links. I tried CSS to solve it, nothing worked. I removed all CSS and it still is the same.
The container div and all the elements inside it is are now links and when I click, it tries to redirect to hrf.html page.
Can you please tell me where I am doing a mistake?
Elements in container div in the dev tool have this code:
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
text-decoration: underline;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Conquer</title>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<div class="nav">
<div class="nav2">
<ul class="navlist">
<li><a href="hrf.html">Homepage</li>
<li><a href="hrf.html">About Us</li>
<li><a href="hrf.html">Services</li>
<li><a href="hrf.html">Contact</li>
<li><a href="hrf.html">External</li>
</ul>
</div>
</div>
<div class="container">
<div class="first-sec">
<div class="first-img">
<img src="image1.jpg" alt="image">
</div>
<div class="heading">
<h1>CONQUER</h1>
<h2>Simple Website Design</h2>
</div>
</div>
</div>
</body>
</html>
it is necessary to close the tags properly otherwise there scope will disturb effects of other tags too..here in your code you forget to close <a> anchor tags thats why its become worry for you..try this
<div class="nav">
<div class="nav2">
<ul class="navlist">
<li>Homepage</li>
<li>About Us</li>
<li>Services</li>
<li>Contact</li>
<li>External</li>
</ul>
</div>
</div>
Best of luck ahead
This is because you haven't closed any <a> tag. You must close it or else you will face same issue.
<li>Homepage</li>
Follow this practice in all <li> elements.
That should fix your code. Let me know.
you haven't closed the anchor tags inside your "navlist" class.
<li>Homepage</li>
<li>About Us</li>
<li>Services</li>
<li>Contact</li>
<li>External</li>
try this..
I tried making menu with 4 links but one of them can be clicked anywhere on the whole page. I tried looking for unclosed tags but can't seem to find anything. I also tried to use sites that check for code errors and they say that there is unclosed tag but either I'm blind or there are no unclosed tags... :/
I know it's noob question but I'm trying for 20 minutes now to find the unclosed tag? that I can't find.
Edit: about.html opens if I click anywhere on the page
I don't know how to upload files so I'm just pasting code below (I also have some css code but I don't think that CSS is the issue):
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<meta name="description" content="opis strony" />
<link href="https://fonts.googleapis.com/css?family=Patrick+Hand&subset=latin-ext" rel="stylesheet">
<link rel="stylesheet" href="Style.css">
<title> Kurs HTML i CSS3</title>
</head>
<body>
<div class="container">
<header>
<div class="title">
<h1>Kurs HTML5 i CSS3</h1>
</div>
<nav>
<ul>
<li><a href="index.html">Start</li>
<li><a href="html5.html">HTML5</li>
<li><a href="css3.html">CSS3</li>
<li><a href="about.html">O mnie</li>
</ul>
</nav>
</header>
<div class="content">
<div class="main-content">
<section>
<article id="html5">
<h2>Artykuł o HTML5</h2>
<figure>
<img src="html5.png">
<figcaption>Logo HTML5</figcaption>
</figure>
<p>Witaj na mojej stronie poświęconej HTML5 i CSS3</p>
</article>
<article id="css3">
<h2>Artykuł o CSS3</h2>
<figure>
<img src="css3.png">
<figcaption>Logo CSS3</figcaption>
</figure>
<p>
Przykładowa treść 1 <br>
Przykładowa treść 2
</p>
</article>
</section>
</div>
<div class="sidebar">
<aside>
<h2>JavaScript</h2>
<p>Warto wiedzieć, że do tworzenia stron internetowych często wykorzystuje się również język JavaScript.
Pozwala on na zaprojektowanie interaktywnych stron internetowych poprzez reagowanie na zdarzenia.</p>
</aside>
</div>
</div>
<footer>Wszelkie prawa zastrzeżone ©</footer>
</div>
</body>
The problem is here:
<nav>
<ul>
<li><a href="index.html">Start</li>
<li><a href="html5.html">HTML5</li>
<li><a href="css3.html">CSS3</li>
<li><a href="about.html">O mnie</li>
</ul>
</nav>
You should close the element after the text of link in this way:
<nav>
<ul>
<li>Start</li>
<li>HTML5</li>
<li>CSS3</li>
<li>O mnie</li>
</ul>
</nav>
If you don't close it everything that comes after the a element is "inside" the anchor element
I am unable to link to html5 section within same page.
Here's the code:
<div id="nav">
<ul>
<li>Contact</li>
<li>Services </li>
<li>About</li>
<li>Home</li>
</ul>
</div>`
<div id="contact">
<h2 id="contact">How to find Us?</h2>
Why is not going to the section "Contact" on the same page but it's trying to open new page: "http://example.com/contact ?
Contact
<div id="contact">my contact</div>
you forgot the #
<ul>
<li>Contact</li>
</ul>
<a name="yourAnchor"></a>
<div id="contact">
<h2>How to find Us?</h2>
</div>
Try this.
Thanks for help. Yes, I forgot to put # (due too many changes/toubleshooting).
I've put the # and I've used unique id for href - that worked like a charm!
Thanks again #TypedSource and #user3713452 for your help!
Hi i am very new to developing , I started to type HTML code in eclipse but it showing processing instruction not closed error .I don't know how to solve please help me .. Thanks in advance
<!DOCTYPE html>
<html>
<body>
<div class="banner_page">
<div style="width: 90%; margin: 16px 0px 16px 104px;"></div>
<div class="header_menu">
<div style="float: left;">
<ul>
<li>Home</li>
<li>Pages</li>
<li>Mega menu</li>
<li>Gallery</li>
<li>Blog</li>
<li>Support</li>
<li>Contact</li>
</ul>
</div>
</div>
</div>
</body>
</html>
Select all your code, then BACKSPACE, then CTRL+Z to revert back the changes.
Just close the JSP tab and reopen it will solve
Select all your code CTRL+A, copy it CTRL+С.
Delete original file.
Create a new file with the same name, paste CTRL+V the copied code and save changes.
I tabbed your code out and it appears you are missing a closing DIV tag
<!DOCTYPE html>
<div class="banner_page">
<div style="width: 90%; margin: 16px 0px 16px 104px;"></div>
<div class="header_menu">
<div style="float: left;">
<ul>
<li>Home</li>
<li>Pages</li>
<li>Mega menu</li>
<li>Gallery</li>
<li>Blog</li>
<li>Support</li>
<li>Contact</li>
</ul>
</div>
</div>
</div>
<!-- you need another closing div tag here for banner_page -->
</body>
</html>
I got rid of the error by the following steps...
Ctrl + All
Ctrl + x
Ctrl + save
close the html file
Reopen the same html file
Now save the cut code from the former
Now all the errors disappeared