Likes: 0
Results 1 to 5 of 5
Thread: [TUT] Combining HTML and CSS
-
20-01-10, 05:48 AM #1
[TUT] Combining HTML and CSS
Register to remove this adSource: TechTuts.com
Introduction
Combining HTML and CSS is an basic, but essential step to creating great templates, websites, and many other customizable scripts. CSS, or Cascading Style Sheet, allows you to change the style of multiple elements by editing a single piece of coding, rather than editing each HTML element. There are two ways to include CSS in a HTML file, internally and externally. Internal CSS is displayed in the head of a document, while external CSS is links from a separate file. Now that you know the basic idea of CSS, let's begin by adding CSS to an HTML document.
› See More: [TUT] Combining HTML and CSS
-
20-01-10, 05:48 AM #2
Adding CSS to HTML Internally
The first method of adding CSS to HTML is internally. Internal CSS is positioned between the HEAD tag of the HTML document. When using small amounts of CSS this is ideal. It keeps the entire script in a single file, making it more organized.
First we musty create a new HTML file. Below is a simple example of a simple HTML document.
HTML Code:<HTML> <head> <title>Combining HTML and CSS</title> </head> <body> A simple tutorial on how to combine HTML and CSS to make a better script. </body> </HTML>
HTML Code:<style type="text/css"> </style>
<HTML>
HTML Code:<head> <title>Combining HTML and CSS</title> <style type="text/css"> </style> </head> <body> A simple tutorial on how to combine HTML and CSS to make a better script. </body> </HTML>
Now you have adding the tags to create an internal CSS script. Later we'll learn how to write CSS and how to style HTML elements.
-
20-01-10, 05:49 AM #3
Adding CSS to HTML Externally
The second method to adding CSS to HTML is externally. External CSS is ideal when you have a long CSS, which would otherwise create a huge HTML file. Now we use the simple HTML file again.
HTML Code:<HTML> <head> <title>Combining HTML and CSS</title> </head> <body> A simple tutorial on how to combine HTML and CSS to make a better script. </body> </HTML>
HTML Code:<HTML> <head> <title>Combining HTML and CSS</title> <link rel="stylesheet" type="text/css" href="css.css" /> </head> <body> A simple tutorial on how to combine HTML and CSS to make a better script. </body> </HTML>
-
20-01-10, 05:50 AM #4
CSS Classes and ID
CSS is made of primarily two main types, ID's and Classes. These are the connection between the HTML and CSS. To differentiate between ID's and classes, a period is used before the class name, and a number sign before the ID name. Below are two examples that should be added to the CSS area of your script.
HTML Code:.classname #idname
HTML Code:class="classname" id="idname"
HTML Code:<div class="classname">Text here</div>
I hope this tutorial helps newcomers and users new to HTML and CSS. If you have any questions, Personal Message me, or post a comment.
-
02-06-10, 03:45 PM #5
Register to remove this adAwesome Tutorial ;D
I wonder if you could make a tutorial about classes, from PSD to HTML and such x)
Thanks on advantage ;D