|... From 14|
• Files Files Files ....
Everything on your computer is a file. All the content on your computer is stored in the form of files. For the purpose of understanding we can classify the files into two types.
» Program files
Files which work on their own. They in most cases contain program code in a machine readable form.
» Data files
Files are identified by their names and have an extension attached to their names. File name extensions may not be visible, if they are set to be hidden on your computer. The name of the file and its extension are separated by a dot. [Name.Extension]. Generally the extension is only 3 or 4 characters long.
Program files mostly have the extension ".exe" (executable), .com (command) or .bat (batch) and data files have an extension based on the program that has been used to make it. The most common program file name extension is .exe.
All these explanations are relevant in windows working environment.
|Executing, Editing, Reading Files|
• Program Files are Executed
Program Files are made to work on their own. Making a program file work is called "Executing" the Program or Program File (in technical sense) and "Opening the Program or Program File" (in normal usage).
Opening Microsoft Word, Microsoft Excel, Microsoft Power Point, Paint Brush, Mine Sweeper, etc. are some examples of executing program files.
Program files cannot be edited. The only way they can be used is to make them do the work they are programmed to.
• Data Files are Edited/Read
Editing and Reading are the two ways in which the data files are handled.
» Editing data files
Editing the data files implies making changes to an existing file or creating a new file and putting in some content into it.
Data files are capable of being edited unless they are locked/barred from being edited. Files which are barred from being edited may be allowed to be read, in which case they are called Read Only files. PDF files that internet users frequently come across, Song files, Movie Files etc which we generally see to be read only.
To edit a data file you need the program related to it (in most cases the program that has been used to make it).
• Editing a Word Document
We edit a Word Document using the program Microsoft Word,
Opening an existing document or Creating a new document, making changes to it, saving it in the modified form constitute the task of editing the word document.
• Editing a Spreadsheet
We edit a spreadsheet (made using excel) using the program Microsoft Excel,
Opening an existing Spreadsheet or Creating a new spreadsheet, making changes to it, saving it in the modified form constitute the task of editing the spreadsheet.
• Editing a Bitmap Image
We edit a bitmap Image using paint brush or any other program which has the capability of editing a bitmap image, like Adobe Photoshop, CorelDraw, etc.
Opening an existing image or Creating a new one, making changes to it, saving it in the modified form constitute the task of editing the image.
One or more programs may be capable of editing a particular type of data file as in the case of the bitmap image.
» Reading a data file
We can either edit a data file or just read it. The word reading should be assigned a broader meaning here. It also includes the activities like copying, printing etc. Data files which are only capable of being read are identified as "Read only" files.
Even for reading data files you need programs. A program that is used for creating/editing a data file is far more capable than the program that is useful only for reading the data file
• Word Document Reader
Microsoft Word Reader (Microsoft Word with some features removed) is a program which can be used to open and read, copy, print content. You would need the fully functional word program for editing the word document, you cannot edit it with the reader program.
• Reading a PDF file
The most common form of a read only file that web users see is a PDF document. If you notice the program name "Adobe Acrobat Reader" carefully, you can see the words reader in the program name for this.
"Adobe Acrobat Reader" is a program that has the editing features of the "Adobe Acrobat" program removed. You can edit PDF files in the program "Adobe Acrobat" and can only read them in the program "Adobe Acrobat Reader".
The reader program can also be used to print, copy the content of the PDF file (unless the security feature in the program has been used by the one making the PDF file to restrict these functions)
Programs which have some of their features disabled are called Stripped down versions.
|HTML File Editors, Readers|
• HTML Files
A file with the file name extension ".htm" or ".html" is a HTML document. Generally we classify a file as a data file, based on the file name extensions. Since it does not have a .exe, .com or .bat extension a HTML file is a data file but not a program file. Therefore, we need a program to edit or read the HTML file.
• Content of HTML Files
A HTML file is made up of the textual content that is displayed when the file is opened in the browser, as well as the various HTML tags (like <p> , <table>, <div> , </b>, <script>, <body> etc.) embedded within the text [we may also say that the tags surround the text].
To see the source/content in the current file/page in display, choose the menu option ... View | Source on your browser (Or) Right Click and from the short cut menu displayed choose View (Page) Source
• HTML Editors
A HTML file can be edited in many programs. Any program that can read simple text (Notepad, Wordpad etc) can be a HTML editor. There are specialised HTML editors like Frontpage, DreamWeaver, etc., which are capable of accomplishing additional tasks We can even use a word processing program like Microsoft Word for editing HTML files etc.
• HTML Readers » Browser
Reading a HTML file does not mean simply displaying the contents of the HTML file. It requires the program reading a HTML file to display the contents based on the HTML tags found in the text making up the file.
In general all editors are readers. If a file is capable of being edited in a program it implies that it is capable of being read in that program also (A word document can be edited in the program Microsoft Word and can be read in the same program). However, a HTML editor cannot perform the function of a reader. To read a HTML file you need a special program called a browser. "Internet Explorer", "Fire Fox", "Netscape Navigator", "safari", "Opera" etc are some browser programs.
HTML tags are instructions to the browser. These form instructions to the browser on how to display the content in the browser window. The browser formats the content in a web page based on these tags. For example if you place some text between the tags <b>, and </b>, the browser understands that the text between these tags is to be formatted and displayed in bold.
• Opening Tag <name>
The opening/beginning HTML tag is a word bound between an opening (left) angle bracket, a closing (right) angle bracket (like <div>, <span>, <table>, <b >, <p>, <img> etc). It indicates the beginning of the content being marked.
• Closing Tag </name>
The closing tag is the opening/beginning HTML tag with a slash immediately after the opening angle bracket (like </table>, </div>, </span>, </b>, </p>, </img> etc). It indicates the end of the markup.
• Web Page » a HTML File
A web page in its simplest sense is nothing but a HTML page. A web page can be either a HTML document or other documents consisting of HTML code. The total HTML code within a web page starts with the <HTML> tag and ends with the </HTML> tag. Generally we find these at the beginning and ending of the file respectively.
• Pages with .asp, .php, .g, .jsp extensions » Are they Web Pages?
The simplest form of web pages are HTML documents (the ones with .htm and .html extensions). You may have come across the file name extensions .htm, .html, .asp, .php, .jsp etc while browsing. Yes, these are also web pages for the person viewing them in his/her browser.
The browser would be able to view them in the same manner because all of them have the same HTML tags describing the content within the file. The <HTML> at the beginning of the content in these files enables the browser to understand that these are web pages.
» Why these different extensions?
These files are treated differently by the server sending those pages. This is because they contain program code that is to be executed and their result is only to be sent to the browser/computer asking for the page.
|Blog Post body » HTML|
The total content relating to a web page is formed by HTML code (tags). The content that you frequently handle is the blog post body. We try giving you an understanding of the HTML relating to your blog post.
Don't get perplexed by all the tags in here. Understand that these are the various tags binding the text that you key in and these would decide the appearance of the content when they are displayed in the browser window.
The above post in display in a web page (blog page) after it is posted.
• HTML Elements
Almost all the content within a web page is confined within pairs of tags (the beginning tag and the ending tag), thus forming the various HTML elements (the building blocks of the web page).
Every HTML element is dealt with as a single unit by the browser. The browser creates the understanding as to what it is and how to deal with it based on the tag related to it. Writing the HTML code implies writing the content that we intend to place on a web page by including them within appropriate tags.
Yes, it is as simple as that if you are interested in learning HTML.
|HTML Element Attributes|
Attribute = An abstraction belonging to or characteristic of an entity
The characteristics/attributes of HTML Elements are defined by placing them within the opening tag relating to the element. Each HTML element has its own set of allowed attributes. Two or more attributes can be included at the same time separating them by Space Bar space.
The attribute takes the form attribute_name = "attribute_value".
Some more examples
• Number of attributes for an Element
The attributes that can be defined for an element are dependent on the element itself. It would be inappropriate to list out the number of possible attributes for each element. You would be getting aware of the attributes that you can use for an element as you keep understanding what each element would represent.
Learning HTML is learning about all the possible elements that exist in a HTML document and knowing the attributes allowed for each element along with the possible values that the attribute can take in relation to that element. HTML becomes very easy if you can understand this idea.
We once again reiterate, "Yes it is very easy".
• Style : A special Attribute
To have a greater control on the behaviour of HTML elements i.e. on formatting, a special attribute by name style is used. Just like any other attribute, the style attribute is also defined within the opening tag. Unlike the other attributes which set one property to the HTML element, a single style attribute can define multiple characteristics for the HTML element.
Element characteristics that are defined using the style attribute are called "properties". Multiple properties are set as values within the same style attribute using ";" (semi-colon) as a separator.
The style attribute takes the form style = "property_name1 : value; property_name2 : value ; .... ".
• Style Properties vs. Element Attributes
Styles and attributes can be used together. Styles have a precedence over the attributes i.e. if there is a characteristic being defined both with the attribute as well as the style property, the style property is applied by the browser ignoring the attribute.
The style properties for a HTML element within a document can be defined within the opening tag. They can also be defined outside the element tag either in the document header or in an external file called a CSS file.
A CSS [Cascading Style Sheet] is a file which can be related to a HTML document and contains the style properties that are defined for the various HTML elements within the document.
Cascade = A succession of stages or operations or processes or units
• Explanation with an Illustration
Consider a HTML document with four divisions at different locations having the same style properties, defining their characteristics.
<div style="background-color:ivory; border:2px double siena;">Say the same tag appears four times in the document i.e. you are using a division with the same characteristics four times and are using the same code to define the characteristics.
The style properties shown above are defined within the <div> tag as an attribute. This can be done in two other ways.
• Style Properties » Precedence
If a particular characteristic for a HTML element is defined as an attribute, in the style attribute, within the style element in the header and also in the external style sheet, then the order of precedence as considered by the browser would be as follows:
What properties we would be able to use for a HTML element, is dependent on the element in consideration. It would be inappropriate to list out the number of possible properties for each element. You would be getting aware of the properties that you can use for an element as you keep understanding what each element would represent.
Learning CSS is learning about all the possible properties that can be used for HTML elements and the possible values that can be used. HTML and CSS becomes very easy if you can understand this idea.
|Author Credit : The Edifier||... Continued Page 16|