answersLogoWhite

0

An ID selector, such as #greenbox {background-color: #DFD;}, is used when you want to set the style of a certain single element (or list of single elements). Generally, this will be used to style an element that serves a single purpose, such as content, nav1, footer, banner, advert1, and so on. It is not used for things that may be repeated throughout the page, because it is improper to have two elements with the same ID (you can use CSS classes for this, such as div.greenbox {...}).

Ideally, You should use an ID selector to style every section of your page. If your page is just one big section, a spew of text sprinkled with inline styles or images, then you probably won't use any ID selectors. A complex site with multiple navigation areas, multiple "main" content sections, a place for advertisements, a small announcements section, and perhaps a banner, header, and footer, might use anything from ten to a hundred ID selectors.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you use PHP in HTML?

You can't use PHP in an HTML document, but you can use HTML in PHP script.


How do you use hyperlinks in frames in a HTML document?

You can use hyperlinks in frames too in an HTML document. You can place the anchor tag out side of a frame.


What does HTML use to annotate a document?

shitzer


Can you centrally align the heading of the HTML document you created?

When you create an HTML document, you can include a heading on the page. Here is an example of how you can use HTML to center the heading: <center><h1>Page Heading</h1></center>.


What is doctype HTML public -w3cdtd HTML 4.01 transitionalen httpwwww3orgtrHTML4loosedtd?

This is the Document Type Definition that should be the beginning of any HTML document. Generally, there is Transitional, Frameset and Strict.The declaration (technically it's not a "tag") should be the very first thing in your document... if you choose to use it at all. tells the browser what version of HTML you are writing in.More specifically, declares that this document conforms to a specific version of HTML, and specifies what version that is.


What is Doctype?

An identifier in the HTML document, that tells to the browser which type of HTML it needs to use to show contents of that document. Specifying different versions of HTML will result in different behavior of the document. If the type hasn't been specified at the beginning of HTML document the browser might load it slowly or even with the errors. Usage: <!DOCTYPE HTML /*Here goes type of the document specification (DTD)*/>


How do you adjust the size of the background of your HTML design?

You use CSS (Cascading Stylesheets) to add backgrounds to block level elements inside an HTML design. If you want a design for the entire page, the CSS markup will use the "body" selector. The background-image rule is then applied. When you're finished, it might look something like this: body { background-image: url('images/bg.png'); background-repeat: repeat-x; } CSS isn't part of HTML, but a separate language contained in either an external file, or in code added along with the HTML in your HTML document.


How do i HTML question?

You can use any text editor although I suggest Notepad++ which is a free download and save a HTML document as all file types with a .HTML extension


How is the HTML document used for making a hyperlink?

Correct syntax for creating a hyperlink in HTML is <a href="the_file_name_link.html">This is a link</a>


Explain the procedure of linking a style sheet in HTML document?

To link a style sheet into an HTML document, you will use the <link> tag. This tag links, or embeds, the style sheet into the document. This would look like: <link rel="stylesheet" href="style.css" type="text/css" /> This allows you to use the same style sheet and rules on multiple HTML documents.


What are the tools used to create HTML document?

Basically...All that is needed to create an HTML document are: A computer with a text editor (like notepad or textedit) A web browser to view the page you programmed And a working knowledge of HTML!


How do you use HTML to remove HTML you already have?

I don't think you can use HTML to remove HTML, you can hide HTML commands with <!-- TEXT OR SCRITPS HERE --> Any scripts between the <!-- AND --> wont show up on the HTML document. using those are good for leaving reminds like where a form starts and stops or to place something there that you might use later.