HTML/CSS Inline CSS for Setting Page Background: Simplifying HTML Code

  • Thread starter Thread starter biferi
  • Start date Start date
  • Tags Tags
    Css
AI Thread Summary
To set a page background using inline CSS, the correct approach is to use the style attribute within the body tag, such as <body style="background-color: black;">. This method allows for more flexibility and control over the styling compared to using HTML attributes like BGCOLOR. Additionally, using CSS properties like background-color is the modern standard for web design, ensuring better compatibility and ease of maintenance.
biferi
Messages
191
Reaction score
0
When I use HTML I set my Page Tag like this

<BODY BGCOLOR="#000000" BACKGROUND="food.jpg" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00" alink="#FFFF00">

But now I am using Inline CSS so can I do this to set my page background?

<body style="background:black;">
 
Technology news on Phys.org
biferi said:
<body style="background:black;">

use background-color:#000;
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
1
Views
2K
Replies
9
Views
2K
Replies
10
Views
2K
Replies
7
Views
2K
Replies
5
Views
2K
Replies
5
Views
2K
Replies
8
Views
2K
Replies
2
Views
1K
Replies
2
Views
2K
Back
Top