HTML text formatting tags are commands that allow you to add a header, create paragraphs, and create horizontal rules.
Commonly used formatting tags and their attributes:
| Tags/Attribute | Description |
|---|---|
| <!-- Comment --> | Used for inserting comments into your web page |
| <html>,</html> | This tells the web browser that the page you want to view is an HTML document. This is a required beginning and ending tag for all your HTML documents. |
| <head>,</head> | This is the head of the HTML document and contains the <title> tag as well as your <meta> tags. |
| <title>,</title> | Allows you to create a title for your HTML document. It goes within the <head> and </head> tags. |
| <body>,</body> | Used for enclosing the content, or main, section of the page. This tag is required. |
| <h1>,</h1> | First level heading. Very large text size. Requires both beginning and ending tags. |
| <h2>,</h2> | Second level heading. Requires both beginning and ending tags. |
| <h3>,</h3> | Third level heading. Requires both beginning and ending tags. |
| <h4>,</h4> | Fourth level heading. Requires both beginning and ending tags. |
| <h5>,</h5> | Fifth level heading. Requires both beginning and ending tags. |
| <h6>,</h6> | Sixth level heading. The smallest text size for any heading tag. |
| <p>,</p> | This creates a new paragraph. Note: you need to use this tag if you want to create a space between two blocks of texts (paragraphs). Simply hitting the return key will not make a new paragraph because HTML ignores hard returns and spaces. |
| <br / > | This creates a line break. Use it to
create a new line in, say, writing
your postal address where you want a separate line for:
<p>your name<br / > |
| <hr / > | Creates a horizontal rule that can be used to section off part of a page. |
| <strong>,</strong> | Creates bold text. Requires both beginning and ending tags. |
| <em>,</em> | Creates italic text. Requires both beginning and ending tags. |