Pirative
Home Discovery Login

09 - Text in HTML

May 9, 2047

<p>

The HTML Paragraph tag, <p>, is used to define a paragraph of text. It is a block-level element and is typically used to group together sentences or other related text content.

<span>

The HTML Span tag, <span>, is used to group inline elements together for styling purposes. It is an inline element and does not add any visible content to the page itself.

<br>

The HTML Line Break tag, <br>, is used to create a line break in the content of a web page. It is a self-closing tag, which means it does not require a closing tag.

Heading

The HTML Heading tags, <h1> through <h6>, are used to create headings and subheadings on a web page. The Heading tags range in size from the largest, <h1>, to the smallest, <h6>.

<strong>

The HTML Strong tag, <strong>, is used to indicate that the text within the tag should be displayed as strong or emphasized text. The Strong tag can be used to give more weight or importance to certain words or phrases within a sentence.

<em>

This tag is used to mark the text inside it as emphasized. Like with strong, it’s not a visual hint but a semantic hint. Browsers by default make the text in this italic.

<hr>

The HTML Horizontal Rule tag, <hr>, is used to create a horizontal line on a web page. The HR tag is a self-closing tag and does not require a closing tag.

<code>

The HTML Code Blocks tag, <code>, is used to define a piece of computer code on a web page. The Code Blocks tag is often used to display snippets of HTML, CSS, JavaScript, or other programming languages.

Lists

HTML provides three types of lists: ordered lists, unordered lists, and definition lists. Lists are used to group related items together and provide structure to content on a web page.

<ol>

An ordered list is a numbered list of items. To create an ordered list, use the <ol> tag and wrap each list item in the <li> tag.

<ul>

An unordered list is a bulleted list of items. To create an unordered list, use the <ul> tag and wrap each list item in the <li> tag.