Can't insert a html code in to created index.html its think that second part is commentCode:#include <stdio.h> int main(void) { FILE *fp = NULL; fp = fopen("index.html" ,"a"); fprintf(fp,"<meta http-equiv="refresh" content="0; url=http://example.com/" />"); /* Need to insert this code to created file */ (void)system("index.html"); }