HTML - Text Formatting

Text Formatting:

  • In HTML, we have various elements to format text with special meaning. Such various elements are
    • Font <font>
    • Font Styles
    • Font Effects
Font <font> Element:
  • It defines the appearance of text on the web page by changing the font, size, and color.

HTML - Lists


  • HTML List is used for grouping a set of related items in a list on the webpage.
  • In HTML, we have three different methods of specifying list information.
    • Ordered lists <ol>
    • Unordered lists <ul>
    • Description lists <dl>

HTML - Blockquotes


  • The Blockquote <blockquote> tag defines the content from another source with indentation.
  • The Blockquote will have a line break before and after the content by default.
  • URL of the source content can be given using the cite attribute and text representation can be given using the <cite> element.
  • For Short or Inline quotes, we can use the <q> tag.

HTML - Paragraphs


  • In HTML, the default paragraph defined in source code is ignored and it will be presented in a single block.
  • To add a manual paragraph, we can use the <p> tag with align attribute left, right, justify.

     <p align="center">paragraph goes here</p>

  • The paragraph defined using <p> will always start on a new line and browsers will automatically add a white space before and after a paragraph on the web page.

HTML - Headings


  • In general, Headings are the title or subtitle given for the content on the web page.
  • Headings in HTML are defined by using a tag <hn> where 'n' refers to the level number 1 to 6.

HTML - Structure of HTML Document

HTML <!DOCTYPE> Declaration:

  • <!DOCTYPE> declaration is an information to the browser about type of document to expect/to understand the version of HTML used in the document. And this <!DOCTYPE> is not an HTML tag.
  • This <!DOCTYPE> declaration is not case sensitive.
  • In HTML5, the declaration of <!DOCTYPE> is very simple.

<!DOCTYPE html>