TEXT
There are multiple tags that are important to know when dealing with text in html. First off, text itself has no reason to appear within brackets of any kind. All alone, it will show up normally in a browser. However tags will be used, mostly to format text, as well as make additional changes.The first tag to know when formatting text is p, for paragraph. It begins with <p> and ends with </p>. It automatically adds a line break before and after the text within the tag. Code implementing the tag would typically appear so:
<p> This is a new paragraph with a bunch of really neat information that somehow pertains to you. </p>
To see the line break in action, we'll take the following code and make a page.
<p> This is a new paragraph with a bunch of really neat information that somehow pertains to you. </p>
<p> This is another new paragraph with a bunch of really neat and new information that somehow pertains to you. </p>
<p> Holy crap this is even another paragraph. Check this stuff out. </p>
To see how this displays, click here.
Line breaks can also be added to text using the tag <br />. It is another one of the tags that automatically closes itself, much like the img tag. Lets look at the code.
Here is some text
<br />
Here is more text
<br /><br />
What the two lines… make it stop!
This would then appear so. As you can see, multiple line breaks can be built up to create space when necessary.
For a large amount of text that needs to be formatted in a very particular way, the pre tag exists. It allows you to set up the text however you wish in the source code and have that appearance reflected in the browser. It would appear something like this.
<pre> Look I
can make completely
unnecessary line
breaks and it will still
show up that
way and big freaking spaces too
</pre>
Obviously this doesn't appear extremely helpful at this point, but the nice thing with the pre tag is that you can also include symbols and other characters that normally wouldn't show up the way you'd always like. For example:
<pre> In html, you may want to use the <br /> tag to make a line break! </pre>
This will actually make <br /> show up in the text instead of just creating a line break in your sentence.
Last but not least, some attributes of text can be edited by html tags. These should traditionally be controlled by style sheets, but occasionally good excuses come up for making use of the strong and em tags. Putting text between <strong> and </strong> will create bolded text, while the same between <em> and </em> will make italics. Again, this is rarely something worth making use of, but acknowledging its existence is cool.