Modifying CSS stylesheet does not alter the background color

body { background-color: bisque;
}
<!DOCTYPE html>
<html>
<head>
    <title>Reading</title>
</head>
<body>
    <h1>  
        <button><a href="index.html">Home</a></button>  
        <button><a href="reading.html">Reading</a><br/></button>
        <button><a href="coffee.html">Coffee</a></button>
    </h1>
    <div>
        <h1>I enjoy drinking several cups of coffee during the week.</h1>
        <img src="cof1.JPG" height="171" width="294"
                alt="Coffee"/> 
        <img src="cof2.JPG" height="168" width="300"
                alt="Coffee"/>   

        <h2>Some of my top coffee picks include:</h2>
        <OL>
            <LI> Cafe Crema</LI>
            <LI>Yaucono</LI>
            <LI>Arabigo</LI>
            <LI>Cafe Lareño</LI>
            <LI>Mami</LI>
        </OL>
    </div>
  </body>
  </html>

I've experimented with various styles in an attempt to adjust the background color, but I haven't been successful. While this webpage functions correctly, it lacks visual appeal. Using CSS is necessary to compare the different styles.

Answer №1

I simply pasted your code and it worked perfectly for me. It seems like the issue might be that you forgot to refresh the page. I suggest trying a hard reload by pressing CTRL+F5 on Windows or Command+R on Mac.

Answer №2

Yes, it does indeed work. I made a modification to your query so that it functions as a snippet and successfully displayed in your source code. The only adjustment I implemented was switching the p tag to a div tag because the p tag is typically used for paragraphs, whereas you required a block element.

Observe how I altered the background color to blue:

body {
  background-color: blue;
}
<!DOCTYPE html>
<html>
<head>
    <title>Reading</title>
</head>
<body>
    <h1>  
        <button><a href="index.html">Home</a></button>  
        <button><a href="reading.html">Reading</a><br/></button>
        <button><a href="coffee.html">Coffee</a></button>
    </h1>
    <div>
        <h1>I usually drink three to four cups of coffee on weekdays</h1>
        <img src="cof1.JPG" height="171" width="294"
                alt="Coffee"/> 
        <img src="cof2.JPG" height="168" width="300"
                alt="Coffee"/>   

        <h2>Some of my favorite coffees are: </h2>
        <OL>
            <LI> Cafe Crema</LI>
            <LI>Yaucono</LI>
            <LI>Arabigo</LI>
            <LI>Cafe Lareño</LI>
            <LI>Mami</LI>
        </OL>
    </div>
  </body>
  </html>

Answer №3

Perhaps there is an issue with the page reload

Try hitting Ctrl + R

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Incorporate a progress bar and delete functionality for uploading files in PHP

I am currently working on creating a file uploader that includes a progress bar and a close button. However, I have encountered some major issues with the code. The progress bar continues to show endlessly, and the main problem is that it deletes the file ...

The Wagtail/Django block is struggling to properly display content from a custom or nested StructBlock template

I have a block in the header of my base template that will apply "extra" CSS styles. These styles are dynamic and based on fields from a Wagtail CMS instance. In the base.html template, I define: <head> {% block extra_css %}{% endblock %} </he ...

What is the best method for retrieving values from selected radio buttons?

I am trying to retrieve the values of the selected radio buttons with the name is_external example.html <div class="exter_inter"> External <input type="radio" name="is_external" value="1" <?php if(isset($_GET['status']) &&am ...

Particle JS - Taking over the entire screen

I have incorporated Particle JS into the banner using the link provided. It should be confined within the banner, with a white background underneath displaying the header text "hello there." However, the Particle.JS effect is currently taking over the enti ...

Is there a way to manipulate CSS to update automatically when new content is loaded via ajax?

I need help with customizing the CSS for 4 image links on my website. Each link is represented by a small image in its normal state and a larger image when hovered over. The content for each link is loaded using ajax. My question is how can I modify the C ...

Encountering Issues with Formatting InnerHtml Text using RegEx

Technology: React.js I have been working on a custom function in JavaScript to highlight specific words within a code block. The function seems to be functioning correctly, but the highlighting isn't staying after the function is completed. Any ideas ...

Taking on The Notch: How Can I Improve?

I'm currently working on a website for my friend's bar, but I'm facing an issue with Chrome where the content can't push past the "notch". Interestingly, Safari displays it fine on mobile, while Chrome has this unsightly white space. I ...

Identifying when a user is idle on the browser

My current project involves developing an internal business application that requires tracking the time spent by users on a specific task. While users may access additional pages or documents for information while filling out a form, accurately monitoring ...

Execute an if statement in PHP upon clicking an image, all while avoiding the need to refresh the

My goal is to trigger my PHP mail(); code with an if statement when an image is clicked. Here's what I've attempted so far: <?php $to = "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="720013041c111d1f02131c0b321 ...

Generating a list of items to buy using a JSON document

So here's the json file I'm working with: [ {"task":"buy bread","who":"Sarah","dueDate":"2023-10-18","done":false}, {"task":"clean car","who":"David","dueDate":"2023-08-30","done":true}, {"task":"write report","who":"Jenny","dueDate":"2023-09 ...

What could be causing my Material UI Table to disappear when I toggle the "Show" option?

I am incorporating the Grow material ui component to display or hide a table. Initially, the table is visible. <Box className={classes.object_controls_wrapper}> <Box sx={{ display: "flex" }}> <Grow in={objectViewOpened ...

Aggregate the data entered into input fields on one page and display them on a separate page

Can you help me with this task? - I have 2 pages set up (page 1 has input fields & page 2 is where the entered data should be displayed) - I want to retrieve all the text input from the first field and insert it into the "content" tag on the second page. ...

In configuring the print settings, I specified margins to ensure proper formatting. However, I noticed that the margin adjustment only applies to the first page. I need

I have a method that retrieves margin top value from the backend. It works perfectly on the first page of print, but on the second page, the margin top space is missing. initializePrintingSettings() { this.printService.fetchPrintSettings().subscribe(respon ...

`Scrolling through a horizontal menu with no scrollbar present`

Is there a way to create a horizontal menu that can scroll left or right without the scrollbar? I'm looking for a solution like adding on-screen arrow buttons or implementing mouseover functionality. What would be the best approach? div.scrollmenu ...

The web typography appears fuzzy or has incorrect thickness, lacks consistency across pages and even within a single page

The font (ProggyCleanSZBP.ttf from 1.1.5 release) appears to be intermittently thick and blurry. If you compare with , you'll notice that the latter displays as desired in most cases, but there are instances where the issue occurs, such as the first ...

Angular 11.0.3 displaying ngClass issue (Unable to bind ngClass as it is not recognized as a property of div)

While working on an angular project, I implemented a light and dark theme using mat-slide-toggle to switch between themes. The theme is stored as a boolean called isDark in a Behavioral Subject service. There are two lazy-loaded modules - one for the home ...

Explore the functions of jQuery's .css() method and the implementation of

Could use some assistance with the .css() method in jQuery. Currently working on a mouseover css menu, and encountering an issue when trying to include this code: $(this).siblings().css({backgroundColor:"#eee"}); at the end of my script. It seems to int ...

Utilize Vuetify to showcase a vertical layout consisting of a header and a v-card, occupying the full height

<template> <div> <div style="height: 20px; color: yellow"> test </div> <v-card class="markdown-preview" tile> <v-card-text v-html="previewText"> </v-card-text> ...

Error encountered in Django when attempting to pass an SQL query due to an UnboundLocalError

When I encountered an issue: Environment: Request Method: POST Request URL: http://127.0.0.1:8000/mainpage.html Django Version: 3.2.12 Python Version: 3.7.4 Installed Applications: ['django.contrib.admin', 'django.contrib.auth' ...

Unable to apply styling to table cells that are dynamically added using JQuery within an Angular

Currently working on setting up a form using Angular. Within the hotel.view.html file, there is a table that looks like this: <table id="rooms"> <tr> <td>Room Type</td><td>Beds</td><td>Q.ty</td ...