Jump to content

Metode Pentru A Implementa Css In Pagina


gaby

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.