How to make one section of a code loop 5 times

Ok, So I need to make an led blink 5 times before it stays on constant. I'll give you the whole code if that helps. Sorry if the "Code box" Isn't right, it doesn't seem to want to work for me

int led = 7; // Green led 1
int led2= 6; // Green led 2
int led3= 5; // Green led 3
int led4= 4; // Red led 1 
void setup() {                
  
  pinMode(led, OUTPUT);     
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4,OUTPUT);
}


void loop() {
  digitalWrite(led, HIGH); 
  delay(500);               
  //digitalWrite(led, LOW);    
  delay(0);               
   
   digitalWrite(led2, HIGH);   
  delay(550);               
 // digitalWrite(led2, LOW);    
  delay(5);  

digitalWrite(led3, HIGH);   
  delay(600);               
 // digitalWrite(led3, LOW);    
  delay(10); 

digitalWrite(led4, HIGH);   
  delay(650);               
 // digitalWrite(led4, LOW);    
  delay(15); 
  

}

So I need

void loop() {
  digitalWrite(led, HIGH); 
  delay(500);               
  //digitalWrite(led, LOW);    
  delay(0);

To loop 5 times before it moves to the next, Sorry to bother guys, but I'm a newb at all of this.

use a "for" loop. Google is your friend. there should also be an example sketch in the control section.

Take another look at ‘Blink’

This blinks one LED five times then it goes solid ON.

/*
  Blink
  This example code is in the public domain.
 */
int times = 0;
boolean flag = false;

void setup() 
{                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() 
{
  if (flag == false)
  {
    for (times=0; times < 5; times++)
    {
      digitalWrite(13, HIGH);   // set the LED on
      delay(1000);              // wait for a second
      digitalWrite(13, LOW);    // set the LED off
      delay(1000);              // wait for a second
    }
    delay(1500);
    flag = true;
  } 
  digitalWrite(13, HIGH);
}