Learn Computer Programming In Tamil

Breaking

[தமிழில்] HTML & CSS Online Course

[தமிழில்] HTML & CSS Online Course
[தமிழில்] HTML & CSS Online Course

Sunday, September 20, 2020

[Tamil] How to add css in tamil


மூன்று வழிகளில் நம்மால் CSS-யை HTML உடன் இணைக்க முடியும்.

1.)Inline CSS
2.)Internal CSS
3.)External CSS

Inline CSS:
Inline CSS என்பது ஒரு element-க்கு மட்டும் style-யை கொடுக்க பயன்படுகிறது.

Syntax

<html_tag style="css_Property:Value";></html_tag>


Example:

  <html>
<head>
<title>Inline CSS</title>
</head>
<body>

<p style="color:yellow;background-color:gray;font-size:40px;">Inline CSS</p>

</body>
</html>


Internal CSS:
Internal CSS என்பது ஒரே ஒரு html page-க்கு மட்டும் style-யை கொடுக்க பயன்படுகிறது.

Internal style-யை <style> element-க்கு உள்ளே தான் கொடுக்க வேண்டும்.
முக்கியமாக, <style> element ஆனது head section-க்கு உள்ளே கொடுக்க வேண்டும்.

Syntax

<style>
selector{

property:value;

}
</style>


Example:

  <html>
<head>
<title>Internal CSS</title>

<style>
p{
color:red;
background-color:gray;
font-size:45px;
}
</style>


</head>
<body>
<p>Internal CSS</p>
</body>
</html>


External CSS:-
External CSS என்பது அனைத்து HTML page-க்கும் style-யை கொடுக்கப் பயன்படுகிறது.

<link> என்கிற element-க்கு உள்ளே தான் External CSS file ஆனது கொடுக்கப்பட்டிருக்கும்.
இந்த link element-யை அனைத்து webpage-க்கும் உள்ளே கண்டிப்பாக கொடுக்க வேண்டும்.
இந்த link element-யை head section-க்கு உள்ளே தான் கொடுக்க வேண்டும்.

Syntax

<head>
<link href="URL" rel="relation_type"></link>
</head>


href -> href என்பது எந்த இடத்தில் external style sheet இருக்கிறது என்கிற இடத்தைக் குறிக்கின்றது.

rel -> rel என்பது html-க்கும் style sheet-க்கும் ஒரு தொடர்பை ஏற்படுத்துகிறது.

External style sheet-க்கு உள்ளே CSS Code-யை மட்டும் கொடுக்க வேண்டும்.html code-யை கொடுக்க கூடாது.
External style sheet-யை save செய்யும்போது .CSS என்கிற extension-யை கொடுக்க வேண்டும்.

  demo.html

<html>
<head>
<title>External CSS</title>

<link rel="stylesheet" href="demo.css"></link>

</head>
<body>
<p>External CSS</p>
</body>
</html>


  demo.css

p{
color:blue;
background-color:red;
font-size:50px;
}

No comments:

Post a Comment