Knowledge of HTML and CSS are required to make a webpage. By learning HTML and CSS, you will learn to structure your web page correctly, add various elements, comments, image, text, links, etc. Here is the basic guide to CSS and HTML.

Basic tools required

You will need a number of tools to build your website. You will need a text editor to edit tet files; web browser to view web sites and an FTP client to transfer files across the Internet using the File Transfer Protocol. You can use Notepad as your text editor and Internet Explorer as your web browser.

Understanding terms

In HTML, the most common terms used are ‘elements’, ‘tags’ and ‘attributes’. Elements define the structure and content of objects within a page. Tags are elements surrounded by less-than and greater-than angle brackets. Attributes are additional information about an element. Common CSS terms are ‘selectors’, ‘properties’, and ‘values’. You should understand the meaning of these terms.

Setting up HTML document structure

HTML documents are saved with an .html file extension. In order to write HTML, you need a plain text editor. Dreamweaver and Sublime Text are popular text editors. All HTML documents have the following structure.

<!DOCTYPE html>, <html>, <head>, and <body>

Referencing CSS

You need to reference CSS file within the HTML. The best practice is to include all the styles in a single external style sheet that is referenced from within theelement of the HTML document. This way you can use the same styles across the whole website. There are other options for referencing CSS as well which includes using internal and inline styles. In order to create the external CSS style sheet, you need to use the text editor and create a file with a .css file extension. The CSS file should be saved within the sam folder as the HTML file. The element is used within theelement of the HTML document to define the relationship between the HTML file and the CSS file.

Using CSS Resets

Web browsers have their own default styles for different elements. Google Chrome’s style is different from the Internet Explorer’s style. In order to allow for cross-browser compatibility, CSS resets are widely used. CSS resets consider the common HTML element with a predefined style and provide one unified style for all browsers.

These are the basics of HTML and CSS. As you practice more, you will become more familiar with them.

info