I am creating a documentation page and in one section I attempt to explain the anatomy of the HTML document. In the final outcome, it does not show the correct indentation.
Code:
<p>
<code>
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Title Name</title>
</head>
<body>
<h1>This is a headline.</h1>
<p>1st paragraph.</p>
<p>Usually there's quite a lot here.</p>
</body>
</html>
</code>
</p>
I even added physical indentations and it is still not evident in the final result.
<p>
<code>
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Title Name</title>
</head>
<body>
<h1>This is a headline.</h1>
<p>1st paragraph.</p>
<p>Usually there's quite a lot here.</p>
</body>
</html>
</code>
</p>
tag?](https://stackoverflow.com/questions/21646408/how-do-i-use-indentation-in-a-code-tag)
– str Oct 17 '22 at 18:35