When I deploy the Jekyll website It shows some errors. Can anybody help me, please!! http://c118-dev.s3-website-us-west-2.amazonaws.com/
Screenshot 2021-09-07 210723|690x84
This does not necessarily look like a Jekyll problem, but an HTML problem.
First, you might want to run your code through a closure checker (see the end of this response), because you have span and href tags that complete the >
on a new line. Technically, most browsers address this problem for you, but it is not well-formed html. For example, you have a bunch of span tags that look like this:
<span>...</span
>
And should look like this:
<span>...</span>
That said, I think the specific issue you are encountering is as the browser points out. Here is your code:
236 <div class="text home-text" >
237 <h1 class="slider-header" style="color: white; text-align: center; margin-top: 200px;">Katmai Oncology</h1>
238 <p></p><p class="slider-paragraph" style="color: white; text-align: center;">voted #1 Cancer Clinic in Alaska</p></p>
239 </div>
You have an opening <div>
tag on line 236.
On line 238, you have an opening and closing <p></p>
tag set, which is fine. Then, you have an opening <p class=...>
and a closing </p>
tag at the end of the line that is also fine.
Finally, at the end of line 238, there is yet another closing </p>
tag that is missing an opening <p>
tag.
All that leads me to believe that the browser is stuck trying to figure out your intent and is asking the following question: “Are you trying to close a missing <p>
tag element or are you really trying to close the <div>
tag?”
If my assumption is correct, then removing that dangling </p>
at the end of line 238 should clear things up, like this:
<p></p><p class="slider-paragraph" style="color: white; text-align: center;">voted #1 Cancer Clinic in Alaska</p>
A quick eyeball scan of your code shows a similar problem on line 242 with one opening <p class=...
tag at the front and two closing </p></p>
tags at the end. I think you only need one.
In 246 through 249, you seem to have a <p>
tag that wraps <div>
and a <span>
tags as well. While I am not an expert, this does seem a little odd to be doing that.
I am sharing these other issues with you because I do not think your document is well-formed html even if it does display as you would expect in a browser.
If you are automating the output of these files with Liquid, I think you might want to clean up that code. If you are simply rendering a page of HTML, then I suggest you go through it with a fine-tooth comb and clean it up.
Here are two easy ways to see what’s going on with problems in your code (they are not always 100% accurate, but usually very helpful):
The html validator. Even if you skip the warnings, you should at least fix the error
and fatal error
items:
https://validator.w3.org/
Alicia Ramirez has a decent closure checker, however, that code looks for opening tags missing closing tags, not extra closing tags missing an opening tag as I found in your html. That said, it is her code that highlighted the <span>
issue I found.
It is working! Thank you, sir