# Undefined control sequence and \chapter error

I’m getting an “undefined control sequence” error with the following code, using TeXstudio:

\documentclass[11pt]{article}
\begin{document}
\begin{center}
\chapter{CHAPTER 6}
\end{center}
\end{document}

• Welcome to TeX.SX! Articles don't have chapters, so the article class doesn't have a \chapter command. Maybe you want to use the report or book class. – egreg Jun 1 '13 at 15:39
• Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. – Claudio Fiandrino Jun 1 '13 at 15:52

The article class doesn't define the \chapter command, because articles don’t have chapters. Instead they have sections, subsections, etc. If you really want to use article, then you might want to consider using \section, \subsection and so on.
If you really want to use the \chapter command, then I’d suggest using the book or report document classes.
Separately, you generally shouldn’t use \begin{center} … \end{center} for headings. It’s really better used to make lists or similar. A better way to centre your title headings is to use the titlesec package, which is described in another question on TeX.se.
Command \chapter is undefined in article. It is defined in book or report.