Code is successful gives op but still shows wrong answer

#include <stdio.h>
#include <string.h>

int main(void) {
// your code goes here

int t;
scanf("%d",&t);

while(t--)
{
    char s[1000];
    scanf("%s",s);
    int l = strlen(s),flag=0;
    
    if(s[0]!='<' && s[1]!='>' && s[l]!='>')
    {
        printf("Error\n");
    }
    else
    {
        for(int i=2;i<l-1;i++)
        {
            if(islower(s[i]) || isdigit(s[i]))
                continue;
            else
            {
                flag = 1;
                break;
            }
        }
        
        if(flag==0)
            printf("Success\n");
        else
            printf("Error\n");
    }
}   
   
return 0;

}

read the problem carefully . the body cannot be empty . you need atleast one character opening and closing html tag </ at_least_one_character >