Using CSS Cascaded style sheets to create web pages helps reduce the work of HTML, means you will be able to compress the size of your coding and therefore you will have to work less in creating web pages for your site.
And the best part, the loading speed of your web pages will improve significantly, and it will ease the update and printing process too.
Now that you have come to know about the benefits of using CSS, you must ride this CSS Tutorial: part 1 for taking baby steps to create your own CSS based website.
CSS Tutorial: Part 1(Building main layout of your site)
With the help of the below CSS tutorial, you will be able to create basic layouts of your website easily:
Must know the below HTML Tags:
Only the below 6 basic HTML Tags you need to know in order to create your CSS web page
1.<h> (Heading tag)
The Heading tags which vary from â€˜<h1></h1> to <h6></h6> (h1, h2, h3, h4, h5, h6). As the number after descends, the heading will become smaller. You need this tag to create headings and sub-headings of your page.
This is a screenshot for demonstrating the use of heading tag:
2. <p> (Paragraph tag)
The next tag you need to know is Paragraph tag. This tag is used to make paragraphs on your web page. REMEMBER: A space is automatically included to your paragraph text before and after each <p> tag pair. Below is an example:
3. <ul> (unordered list) and <ol> (ordered list) (Listing tags)
List tags are used to create menus. From which the tag <ul> is used for un-ordered listing which forms a list with bullets or other symbols that do not state or act according to an order. The second listing tag is <ol> which means ordered list, which creates numbered or lettered lists with order. Below is an example demonstrating the uses of both the tags, respectively:
4. <div> (Division creating tag)
This tag creates portion/parts of your page so that you can apply things in it (rather than applying it on the complete page). In simple words, you create a container to put things in by using this HTML tag. Under this tag whatever you do will apply on it only. This tag is used for dividing web pages into header, center-main body, left content, right content and footer. This is an example:
5. <a href>Â (Hyper linking tag)
This tag is used to hyper link the text to external pages or internal pages (or can be used for linking other things too). Clicking on the text with this tag, will direct you to the page mentioned in its source. Below is an example:
6. <img src> (Image calling tag)
This tag is used to link/call images from an external link or from your folder to display it on your web page.
Layout creation through CSS:
In order to work on the following examples of CSS Tutorial: Part 1, we need to have a HTML page first, which you can create by following the below steps:
1. Create a folder
2. Launch notepad application on your system.
3. A blank notepad will appear in front of you. Name and save it as: practiceHTML.htm. Select the folder destination. Click on when a dialog box appears stating a warning of changing the file extension from. Now go to the folder in which you have saved this file and right click on the file and select: open with and choose Notepad.
4. When Notepad appears, simply paste the below code in it:
The above template code creates the basic formation for all HTML pages. Now your CSS part of the work begins inside the body tag:
Forming The CSS
Now create a new notepad file and name and it as firstCSS.css. Next open that file and paste the below template CSS code in it:
- After pasting the above template code, save it!
- Next insert the below code between thetags:
And insert the below coding between the <head> </head> tags:
This was all for the Part 1 of the CSS Tutorial!