Jump to content
Sign in to follow this  
gaby

Metode Pentru A Implementa Css In Pagina

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 :)

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...