Some Text Elements

The Body of the Page

Every webpage has information that needs to be displayed. If it did not, we would not make a webpage at all! The body element of the page is where the browser renders the vast majority of this information on the page. We will place all the elements covered in this article within the body. To begin and create the body, just place the <body> tag after the closing </head> tag and the closing </body> before the closing </html> tag like so:

<!DOCTYPE html>
  <title>Chad's Random Thoughts</title>
   <meta charset="UTF-8">


Step One:First, type the <body> tag after the closing </head> tag and the closing </body> before the closing </html> tag

Now we are ready to start putting things on the screen!!!

Textual information is the simplest type of information to add and we will begin with that. Just like everything else in HTML, you enclose text within tags. These tags tell the browser certain information about the text such as the size of the font and whether that text will start on a completely new line. The two most basic tags for text are heading and paragraph tags denoted by <h#></h#> (where ‘#’ indicates any number 1 through 6 inclusive) and <p></p> respectively.

Heading Tags

To create a heading in HTML all you need to do is type in <h1> Some Text </h1>. As noted previously, the number in the heading tag can range from 1 to 6 with one defaulting to the largest font-size and 6 defaulting to the smallest font-size. All headings are bolded. The below screenshot gives you an idea of how each header looks when displayed in the browser.


Step Two: Next, make a title for your new blog using <h1></h1> and then make titles for two blog posts using the <h2></h2> tags

Paragraph Tags

Next we have the paragraph tag which operates exactly the same as the heading tag (except there are no default variations in size). Enclose the text you want to add within the tags like so, <p> Some more text </p>, and you will now have a paragraph. Paragraphs are not bolded and are meant to contain larger amounts of information to be read (hopefully) by the viewer of your page. Here is an example of several headings mixed with paragraphs.


Step Three: Next, below each blog post title, make your post content using <p></p> tags.

You can use different heading types to do all sorts of things such as create publish dates and annotate authors of blog posts, indicate subtopics within a major topic or…anything really.


Step Four: Next, between the title and content of each of your posts, place today’s date using the <h6></h6> tags.

Both heading and paragraph elements are examples of block elements. When an element is on a webpage, and does not use all the available screen space, it can be either displayed in a row with other elements (inline) or on the next available line (block). Both heading and paragraph elements are examples of block elements because, by default, they display on the next available line. Block elements are generally larger and contain more information (or have more elements nested within them) than inline elements.

Some More Block Elements

Tags for other block elements include:

  • ol
  • ul
  • pre
  • address
  • blockquote
  • dl
  • div
  • fieldset
  • form
  • hr
  • noscript
  • table

Don’t worry if you do not recognize any of these-I promise we will go over each of them in detail.

Inline elements and Their Use

Inline tags generally surround specific words or phrases that require special attention. There are also some elements that are automatically displayed inline. If we wanted to make a word bold, for instance, we can use the strong tag to do so. To use the strong tag, all you need to do is enclose whatever word or phrase you want to be bold within <strong> </strong>.

The inline tag <em> </em> makes all the written content enclosed within italicized and works in the same manner as the <strong> </strong> tags. You can even enclose some word/phrase/sentence within both to create bolded and italicized written content. To accomplish this, enclose one within the other (the order does not matter).

<p> This is <strong><em>very important</em></strong> stuff!!!</p>


Step Five: Next, use <strong></strong> and/or <em></em> tags to bold/italicize important content within your posts’ content.

Here is a list of more inline elements:

  • b, big, i, small, tt
  • abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var
  • a, bdo, br, img, map, object, q, script, span, sub, sup
  • button, input, label, select, textarea

Step Six: Finally, save your work and use the steps from the previous article to view in your browser.

Review Time

Awesome!!! Now we have a webpage with content. Here is what we went over today:

  1. Information that will be displayed is placed within the body element of the page.
  2. Heading tags are numbered 1 through 6 with 1 having the largest font and 6 the smallest.
  3. Paragraph tags display larger amounts of textual content.
  4. Block elements display on the next available line and include:
    • p
    • h1-6
  5. Inline elements display side-by-side and include:
    • strong
    • em