HTML and CSS Reference
In-Depth Information
All other browsers will ignore everything between the double dashes. Due
to the cascading nature of CSS, element styles in the ie6.css style sheet over-
write previous styles for the same elements set in the style.css style sheet. his
is a common way to deal with the CSS problems Internet Explorer 6 causes
due to its incomplete and buggy implementation of CSS.
HTML comments are not efective inside a script or style element.
JavaScript and CSS have their own syntax for comments. Both use a slash-
asterisk, asterisk-slash sequence to denote comments in the code:
/* this is a CSS or JavaScript comment */
However, when both scripting and CSS were new, page authors enclosed
everything inside a script or style element in HTML comment tags. hey did
this so that older browsers would not stumble over the JavaScript statements
or CSS rules and include them as page content. When you look at the HTML
source of some of these older pages, you might see something like this: 1
<STYLE TYPE="text/css">
<--
/* a bunch of CSS statements in between HTML comment tags */
-->
</STYLE>
CHAr ACTEr EnTiTiES
A character entity is an escape sequence that deines a single letter or symbol
that normally cannot be entered in the text content. A character entity begins
with an ampersand (&) and is followed by either the name of a predeined
entity or a pound sign (#) and by the character's decimal number. A semicolon
is used to terminate the character entity. he tilde (~) , for example, can be gen-
erated by either &tilde; or &#126; . Using the named entity is preferable because
diferent language encodings have diferent numberings.
Character entities are predeined for the symbols that are needed to mark
the beginnings and ends of HTML elements. A complete list of predeined
character entities can be found in the HTML5 speciication. Most good HTML
editors provide a table to assist in editing documents. hree character entities
1. Before the HTML4 speciication, many Web authors used uppercase type for HTML element and
attribute names to visually distinguish them from mixed-case content. Beginning with HTML4, authors
were encouraged to use lowercase names for compatibility with XML syntax rules. In strict XHTML and
HTML5, lowercase names are required.
 
 
Search WWH ::




Custom Search