ran 发表于 , 分类:, Tips, 6条评论 »,10次阅读
HTML (the Hypertext Markup Language) and CSS (Cascading Style Sheets) are two of the core technologies for building Web pages. HTML provides the structure of the page, CSS the (visual and aural) layout, for a variety of devices. Along with graphics and scripting, HTML and CSS are the basis of building Web pages and Web Applications. Learn more below about:
HTML is the language for describing the structure of Web pages. HTML gives authors the means to:
With HTML, authors describe the structure of pages using markup. The elements of the language label pieces of content such as "paragraph," "list," "table," and so on.
XHTML is a variant of HTML that uses the syntax of XML, the Extensible Markup Language. XHTML has all the same elements (for paragraphs, etc.) as the HTML variant, but the syntax is slightly different. Because XHTML is an XML application, you can use other XML tools with it (such as XSLT, a language for transforming XML content).
CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language. The separation of HTML from CSS makes it easier to maintain sites, share style sheets across pages, and tailor pages to different environments. This is referred to as the separation of structure (or: content) from presentation.
The following very simple example of a portion of an HTML document illustrates how to create a link within a paragraph. When rendered on the screen (or by a speech synthesizer), the link text will be "final report"; when somebody activates the link, the browser will retrieve the resource identified by "http://www.example.com/report":
The class attribute on the paragraph's start tag ("<p>") can be used, among other thing, to add style. For instance, to italicize the text of all paragraphs with a class of "moreinfo," one could write, in CSS:
p.moreinfo { font-style: italic }
By placing that rule in a separate file, the style may be shared by any number of HTML documents.
The following very simple example of a portion of an HTML document illustrates how to create a link within a paragraph. When rendered on the screen (or by a speech synthesizer), the link text will be "final report"; when somebody activates the link, the browser will retrieve the resource identified by "http://www.example.com/report":
The class attribute on the paragraph's start tag ("<p>") can be used, among other thing, to add style. For instance, to italicize the text of all paragraphs with a class of "moreinfo," one could write, in CSS:
p.moreinfo { font-style: italic }
By placing that rule in a separate file, the style may be shared by any number of HTML documents.
The following very simple example of a portion of an HTML document illustrates how to create a link within a paragraph. When rendered on the screen (or by a speech synthesizer), the link text will be "final report"; when somebody activates the link, the browser will retrieve the resource identified by "http://www.example.com/report":
The class attribute on the paragraph's start tag ("<p>") can be used, among other thing, to add style. For instance, to italicize the text of all paragraphs with a class of "moreinfo," one could write, in CSS:
p.moreinfo { font-style: italic }
By placing that rule in a separate file, the style may be shared by any number of HTML documents.