In technical speak. the terms used are,
From its inception, Standard General Markup Language has used the left carat and right carat as container characters for element selectors, which were early on nicknamed, tags.
Fast forward, HTML elements are representations of page content according to how it is structured. Typical page content will include headings, paragraphs, lists and images. Early on it was discovered that these elements are difficult to work with on their own, and thus it was determined that container elements were needed. We have divisions and list containers to carry on that role.
Most beginner courses will start with the following on the blackboard:
A browser will render this to the screen in the default typeface and character size. Unseen are all the built in default presentation rules, called style sheets that play a role in the background.
There is a lot of information behind the simple markup above, not the least of which is the discussion of tags and elements. There is a difference, but the two terms are married and joined at the hip, just not synonymous.
<p> => OPENTAG declaring a paragraph TYPE element
</p> => ENDTAG declaring point to stop rendering this element TYPE
<p></p> => An empty paragraph element
Now that we have covered some of the minutia and general terminology we can get to your actual question...
For readability, below, more importanlty between OPEN and END.
<html></html> is the root element that houses the entire document. There is only one in any one page. For production on a mass distribution network (the WWW) specialized software removes all whitespace to reduce the byte size of the file and facilitate faster transfer across networks.
Again, in simplest form,
is perfectly valid and will render with no issues. HTML is not dependent upon white space (leading, trailing spaces and line breaks) to aide in parsing the document into the DOM. Elements get their own nodes and their ogranization in the source document is of no concern. As you will learn, only their structure has any bearing.
However, when writing in creation and development mode, lots of white space, in the form of line breaks, indentation and comments go a long way toward furthering the ideas of the developer and help us to read our code months or years later. These concerns will come up as you progress.