HTML stands for Hypertext Markup Language. HTML is a web development language. HTML files use link element to access CSS inside the head tag. This is an example of a link element found inside the head tag of an HTML file - <link rel="stylesheet" href="style.css">. HTML describes how text and pages are structured and laid out using different tags and attributes. An example of HTML tag is <a> </a> and a property is 'href='.
CSS is a meta language that stands for Cascading Style Sheets. It's used to design style sheets for HTML web pages that define the visual layout of a web page. CSS controls the colours, layout and fonts within a web page. Once a style sheet is created you can use it on any web page as long as you perform the necessary changes according to the specific web page. You can apply differently formatted style sheets to the same web pages and make them look completely different, whilst the text remains the same. An example of CSS tag is 'a:visited { }' and you put a property like 'text-decoration:none;' within the curly brackets.
There are three ways HTML files access CSS. One of them is 'Inline'. This method requires you to type the CSS code within the HTML code. For example, you type in 'style=color:red;' within the <title> </title> tag. Another way is 'Internal'. This technique stores the CSS code in the head tag of a web page. An example would look like this "<head> <style> </style> </head>". The last and most appropriate way is 'External'. This technique uses CSS code from external file such as 'style sheet' to link it to the web page. The link element found in the head tag within the web page is "<link rel="stylesheet" href="style.css">".
--------------------------------------------------------------------------------------------------------------------------
References:
1: Can you explain how HTML files access CSS?, 01/11/2013, http://yhoo.it/18GuaOm
2: HTML & CSS, 01/11/2013, http://bit.ly/8Qjray
No comments:
Post a Comment