Met Console Groupcollapsed
# HTML DOM console.groupCollapsed() Method
[ Console Object](#)
## Example
Create a collapsed group message in the console:
console.log("Tutorial"); console.groupCollapsed(); console.log("Tutorial, this is inside the collapsed group.");
[Try it Β»](#)
* * *
## Definition and Usage
The console.groupCollapsed() method is used to set a collapsed group message. All output messages executed after this code will be inside the collapsed group.
Click the expand button to open the group message.
**Tip:** Use the [console.groupEnd()](#) method to end the current group.
**Tip:** Use the [console.group()](#) method to set a non-collapsed group message.
* * *
## Syntax
console.groupCollapsed(label)
* * *
## Browser Support
The numbers in the table specify the first browser version that fully supports the method.
| Method | | | | | |
| --- | --- | --- | --- | --- | --- |
| console.groupCollapsed() | 6 | 11.0 | 9.0 | 5.1 | Yes |
* * *
## Parameter Values
| Parameter | Type | Description |
| --- | --- | --- |
| _label_ | String | Optional. The group label. |
* * *
## More Examples
## Example
Use the console.groupEnd() method to end the group:
console.log("Tutorial"); console.groupCollapsed(); console.log("Tutorial, this is inside the group."); console.groupEnd(); console.log("Out of the group!");
[Try it Β»](#)
## Example
Set a label for the group message:
console.log("Tutorial"); console.groupCollapsed("TutorialLabel"); console.log("I am inside the specified label group.");
[Try it Β»](#)
[ Console Object](#)
YouTip