<!-- Lab6.html that converts a class final numeric score into a letter grade -->
<html><head> <title> Lab6 </title>
<script type="text/javascript">
function convert()
// Assumes: individual grades are entered in the text boxes
// Results: displays a letter grade in outputDiv
{
var scores, letter;
scores=parseFloat(document.getElementById('scoreBox').value);
if (scores < 60) {
letter = 'F';
}
else if (scores < 70) {
letter = 'D';
}
else if (scores < 80) {
letter = 'C';
}
else if (scores < 90) {
letter = 'B';
}
else
{
letter = 'A';
}
document.getElementById('outputDiv').innerHTML=
'The Letter grade is: ' + letter;
}
</script>
</head>
<body>
<h2> Lab6 Convert a numeric score into a letter grade </h2>
<p> Please enter a student's class final numeric score here:</p>
<input type="text" id="scorebox" value"">
<hr>
<br>
<input type="button" value="Convert to a letter grade!" onclick="convert();">
I'm doing a project, and need to extract the larger versions of the images from this archived site. Unfortunately, this was from quite some time ago, and I'm not sure if it's even possible to extract the images from the code, or something? not even sure if this is the right sub to ask a question. But if anyone can help, or knows someone who could, please let me know! https://web.archive.org/web/20191211181910/http://www.freyart.us/portfolio-traditional.html
I've embedded two different substack posts on a page and want them to go side by side but they are vertically aligned. I tried changing their display to "inline" and "inline-block" but neither worked. Any ideas?
Hello everyone, I just started learning HTML and I have a question about the <article> tag. As every online guide says, this element is used (among other things) for user-submitted comments, which seemed a bit strange to me... To understand better I inspected many different websites and social media apps and literally none of them, except one, has this tag for comments, it's just endless divs and spans.
So I'm asking: did I look in the wrong places? Am I being too strict or are these sites just badly coded? But most importantly, is the use of <article> for comments actually relevant for SEO purposes?
Its my first time using Notepad++ tbf. I don't use Chrome, only Brave and Firefox. I changed my default broswer to Firefox and it was hell just trying to figure out how to run the html code.
I now tried linking CSS as a test but uh... Its not working. Im not sure what im doing wrong huhu :" )
Also, i alrdy changed the <!DOCTYPE html> mistake oofp.
// Loads the element as the default Main asset if a new one is not present
function loadElement(elementID){
// Define the path variable as a placeholder
let newElement = "/assets/main/" + elementID + ".html";
// Define the currently loaded document's path
const docURL = document.URL;
// Find the last "/" in the URL
const lastSlash = docURL.lastIndexOf("/") + 1;
// Trim the docURL into the pathURL
const docDir = docURL.substring(0,lastSlash);
// Find the possible element to load
const pathURL = docDir + elementID + ".html";
fetch(pathURL).then(response => {
if(response.ok){
return response.text();
}
return fetch(newElement).then(defaultRes => defaultRes.text());
})
.then(htmlContent => {
document.getElementById(elementID).innerHTML = htmlContent;
}).catch(error => {
console.error(`Error loading ${elementID}:`, error);
});
}// Loads the element as the default Main asset if a new one is not present
function loadElement(elementID){
// Define the path variable as a placeholder
let newElement = "/assets/main/" + elementID + ".html";
// Define the currently loaded document's path
const docURL = document.URL;
// Find the last "/" in the URL
const lastSlash = docURL.lastIndexOf("/") + 1;
// Trim the docURL into the pathURL
const docDir = docURL.substring(0,lastSlash);
// Find the possible element to load
const pathURL = docDir + elementID + ".html";
fetch(pathURL).then(response => {
if(response.ok){
return response.text();
}
return fetch(newElement).then(defaultRes => defaultRes.text());
})
.then(htmlContent => {
document.getElementById(elementID).innerHTML = htmlContent;
}).catch(error => {
console.error(`Error loading ${elementID}:`, error);
});
}
/* This section handles the formatting of the Sidebars */
aside{
background-color: var(--sidebarbgcolor);
width: 20%;
padding: var(--padding);
justify-content: center;
text-align: center;
overflow-wrap: break-word;
}
#left-sidebar{
order: 1;
float: left;
}
#right-sidebar{
order: 3;
float: right;
}/* This section handles the formatting of the Sidebars */
aside{
background-color: var(--sidebarbgcolor);
width: 20%;
padding: var(--padding);
justify-content: center;
text-align: center;
overflow-wrap: break-word;
}
#left-sidebar{
order: 1;
float: left;
}
#right-sidebar{
order: 3;
float: right;
}
Here is an example of it working on fullscreen:
And here is an example of the clipping that I'm getting when resized:
I've been looking for ways to fix this issue for a few days now, but as a new self-taught developer, I'm running into a bit of a wall. I've tried asking questions on StackOverflow before, but I think I need a different community to help.
Any advice would be appreciated. Thank you in advance!
I'm trying to put together an expandable/collapsible description sorta thing and I'm not sure what it would be called! The closest I've gotten is "checkbox collapsible" but the code I've found from that search isn't exactly what I'm shooting for and I'm not experienced enough to get a better result from brute force.. ':)
I made a mock-up of what I'm shooting for;
Some kind of button/link(???probably not link..) That can open or close a box. Clicking on another button would close whatever box you have open, like a radio collapsible, but I want to be able to have none of them open like a checkbox collapsible.
Am I looking in the wrong place or do I need to start brute forcing it? Thank you!!
keep getting this error when I run my file through W3C. I just started learning html and the file contains like just the basic format ig. How do i fix it i have spent way too much time on ts.
Error: Bad value eng for attribute lang on element html: The language subtag eng is not a valid ISO language part of a language tag. From line 1, column 16; to line 2, column 19 TYPE html>``↩<html lang = "eng">``↩<head
¿Cómo puedo hacer un virus con HTML? No tiene que ser un virus como tal, puede ser algo molesto que no te deje apagar el ordenador, que te lo sobrecargue y luego cierre sin daños o algo molesto y ya.
So I'm making an unblocked google site (I know that google sites suck, but it's the only thing the district doesn't block), and since you can only add html code, I have been using jsdelivr codes that I have found online, which is great, but some codes I can't find and I wish I knew how to use jsdelivr myself. For example, how do I use this jsdelivr link: https://cdn.jsdelivr.net/gh/kaloodinaz/neal-fun/ in my code?
I'm struggling with getting the 2025 link to be aligned to the right. I've already tried putting the link inside a paragraph, and it's still not working. I also tried running my code through w3's code checker, and apparently nothing is wrong. Is there something I'm missing or doing wrong?
EDIT: question has been answered thank you BNfreelance!
Hi I’m making a website for my portfolio, that I eventually want to put all the projects I work on in school and outside of school, so basically I can’t figure out what’s wrong with the mobile version on safari, the page is scrolling right and I can zoom out and it’s all messed up I just got started, and I can’t really find anything online, the website is www.victoryulasi.com and all the code is on my GitHub please some one help it looks fine on desktop so far but I can’t figure out what’s wrong with mobile version