Posts

Showing posts from January, 2023

HTML Tutorial - Tags part 1

       Tag is a signal to web browser for displaying contents. It has two types. ·        Standalone tags ·        Container tags   HTML has wide range of tags with different purpose. Based on location of the usage , tags are divided into many categories. They are listed below… Tags used in Document head Tags used in Document body Tags used in Forms Tags used in table   Here, a detailed explanation of each tags with some examples shown below... 1.Tags used in Document head     As everybody knows,D ocument head is the beginning part of HTML file. It includes base information, heading,title of the page, document meta,information, type of scripting language used in the file,cascading style sheet information and so on… Each tag has served for unique purpose. It has different attributes too. i)             ...

HTML Tutorial - How to create HTML file in text editor???

Image
Do you want to create a website with many web pages??? Do you look for a language for creating a website?? If your answer is “yes”, let us start to use this language “HTML”. What is HTML?. HTML is expanded as Hyper Text Markup Language used to create webpages and websites. It has many elements which makes the browser to display the content. HTML: how it comes…      Initially, HTML was derived from SGML (Standard Generalized Markup Language). After HTML, it was HTML+. Next versions of HTML are HTML 2, HTML 3, HTML 4 and HTML5. Current version is HTML 5. HTML has a structure with many elements with attributes, character and entity references. The structure is given below. <!DOCTYPE html> <html> <head> A sample for HTML </head> <body> <p>Welcome to the world of HTML</p> </body> </html> Where, <> symbol is used to represent elements.   <html>, <head>, <body...

C Programs to practice - File handling

      File is a collection of records. In c,we have a set file related operation. First, use an inbuilt structure "FILE"  for accessing file related operations. Next, create a file pointer for this structure "FILE". Further,use the following syntax to open a file. filepointer= fopen("filename","mode"); where filename is the file in which you are going to process. mode refers the operation.  "r"-Read the file. "w"- Write the content to the file. "a" -Read and write purpose. Once the file is opened, write the contents to the test file until the last character by using a condition strlen(data)<0 followed by fputs() function. When the condition fails,the control come out of the loop. Now, the program is finished. Now, you can open the test file manually and check the content. The data you have written in the test file is shown. The sample program is shown below. "Filehandle.c"   #include <stdio.h> ...

C Programs to practice - Display vehicle information using Structure

 Structures are used to create user defined data structures. It contains variables with different data types combined together. It has a basic syntax given below... struct structure_name {   datatype variablename1;   datatype variablename2;   .......  datatype variable name n; }; Next, create the variable for the structure that declared already. Syntax for creating structure variable is given below... struct structure_name variable_name; using the above syntax,we can create 'n' number of structure variables. After the declaration of structure variable,you can get the input or assign the values for structures. An example with describes the structure which displays vehicle details is given below... #include<stdio.h> struct vehicle { char type[50]; char company[50]; char model[50]; }; void main() { struct vehicle v1={“Motor bike”,”RoyalEnfield”,”Hunter”}; struct vehicle v2={ “Car”,”Maruthi”,”Swift”}; struct vehicle v3={“Scooty”,”Tvs”,”zest...

C programs to practice : basic calculator using switch case

   Switch case is used to select the operations from many statements. Here, a simple calculation program is given below. First, get the operation to performed. Next, get the two inputs. Based on the inputs, perform the operation and display the results. Now ,the program begins…. “calculate.c” #include<stdio.h> #include<conio.h> void main() {   char operation,   double a,b; printf(“Enter the operation: +, - , /, * , % ”); scanf(“%c”,&operation); printf(“Enter the numbers”); scanf(“ %lf %lf”, &a,&b); switch(operation) {   case ‘+’ :                printf(“ %.1lf + %.1lf : %.1lf”, a,b,a+b);                break; case ‘-’ :                printf(“ %.1lf - %.1lf : %.1lf”, a,b,a-b);  ...