Jump to content

Metode Pentru A Implementa Css In Pagina


Recommended Posts

Posted

cssyw6.gif

Prima metoda:

Codul HTML si CSS in aceeasi pagina:

<html>
<head>
<title>Titlu aici</title>
<style type="text/css">
P {background-color: red;}
</style>
</head>
<body>
<p>Background-ul acestui paragraf va avea culoarea rosie!</p>
</body>
</html>[/html]

[b]Exemplu:[/b]

exemplu1xa7.png

[color=green][b]A doua metoda:[/b][/color]

[b]Includem in pagina HTML legatura catre CSS, care este uploadat pe host.[/b]

    [color=green][b]
  • [/b][/color]Mai intai cream un fisier css, denumit stiluri de mine ([b][color=red]stiluri.css[/color][/b]) in care vom adauga codul/codurile css, in exemplul meu:
    [code]p {color: red;}[/code]
    [color=green][b]
  • [/b][/color]Dupa ce am adaugat codul/codurile salvam fisier-ul css ([b][color=red]stiluri.css[/color][/b]). [color=green][b]
  • [/b][/color]In pagina HTML adaugam codul de mai jos:
    [html]<html>
    <head>
    <title>CSS Implement v3</title>
    <link rel="StyleSheet" title="Default" href="stiluri.css" type="text/css">
    </head>
    <body>
    <p>Textul acestui paragraf va fi rosu!</p>
    </body>
    </html>
Legatura catre CSS fiind:
<link rel="StyleSheet" title="Default" href="stiluri.css" type="text/css">

Exemplu:

exemplu2at6.png

P.S: In exemplul dat de mine fisierul css (stiluri.css) este in acelasi loc (folder) cu fisierul html in care am adaugat

legatura spre el.

Daca aveti nelamuriri nu ezitati sa intrebati :)

Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.
--------------------
oG2BN9d.gifse1WdXd.gifQG6MtmI.gifRHYjDzD.gifG5p1wui.gif

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.