Sunteți pe pagina 1din 1

4/ What is CSS?

CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets are stored in CSS files - There are three types of CSS styles: inline styles Inline styles are styles that are written directly in the tag on the document. Inline styles affect only the tag they are applied to. <a href="" style="text-decoration: none;"> embedded styles Embedded styles are styles that are embedded in the head of the document. Embedded styles affect only the tags on the page they are embedded in. <style type="text/css"> p { color: #00f; } </style> external styles External styles are styles that are written in a separate document and then attached to various Web documents. External style sheets can affect any document they are attached to. <link rel="stylesheet" type="text/css" href="styles.css" /> 1/HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language. HTML is not a programming language, it is a markup language. A markup language is a set of markup tags The purpose of the tags are to describe page content Create html file: 1. Programe Note padNote padHTML Tag 1. Open note pad 2. Type following code 3. Save notepad as text.html 4. Open this txt.html in web browser standard structure All HTML tags inside a web page must be enclosed inside a <html> tag. There are two required sections inside an HTML file: <head> and <body>.

section (header) of the document will be displayed in the body of the web page. A standard HTML header looks like this: <head> <title>This is the document title</title> </head>

language attritite The lang attribute is used to identify the language of the content on a web page, when its applied to the html element, or within a given section on a web page, when its applied to a div, span, a, or any other element that may contain content in a language that differs from that used on the rest of the page.

the <body> section The <body> section of the document contains the source for all of the text, with links to the graphics to be shown on the page. The <body> parameters allow the author to control the page backgound, default text colors, and the background color. All of the parameters are optional, and if they are not defined, the browser will display the viewer's defaults. These are descriptions for the 7 major paramaters: bgcolor="color": This parameter defines the background color for the web page. background="image.gif": This defines the graphic that is to be tiled on the page's background. If this parameter is used, bgcolor is ignored. bgproperties="fixed": If this is specified, the background bitmap is fixed, and is not scrolled with the rest of the page. text="color": The default text color. link="color": The default link color. vlink="color": The default visited link color. alink="color": The default active link color. This parameter shows the currently active link within a frameset. It is supported by Internet Explorer 4.0+ and Netscape Navigator 3.0+. All colors can be expressed in either a hexadecimal code (#000000) or a color ("white"). This is what a standard <body> looks like: <body bgcolor="black" text=#FFFFFF link="red" vlink="blue" alink="lightgrey"> <p>This is the body of a page</p> </body> <HTML> <HEAD> <TITLE>Welcome To my Homepage</TITLE> </HEAD> <BODY> Write your message here .It is BODY of your homepage --------------------------------</BODY> </HTML>

the <head> section The first section, <head>, contains metacommands (an advanced topic that will be discussed later) and the <title> of the document. The <title> tag specifies what the name of the page is, and will be displayed in the title bar of most web browsers. No text written in the <head>

S-ar putea să vă placă și