Yummysheep Tutorial

Back to the catalog

Last Update : 2023/3/25

Chatper 2 - Text

1. Text Headings


Headings is using to define the structure of the web page text content.

There are six types of heading tags, which is <h1> to <h6> . The larger number in the heading <h6> , the size of the text will be smaller ; The smaller number in the heading (<h1>) , the size of the text will be bigger

Here is an example:



2. Paragraphs


Paragraph element is an basic element which is used to publish text on the webpages. Paragraphs are defined with the <p> tag. Here's an example:




3. Text Format


HTML supports some tags that you can make some text on your webpages to appear differently than normal text, such as bold text, italic text, highlighted text, and more.
The following example shows the most commonly using formats' tags:


Tip: More than one text format can be put into the Paragraph Tags!

4. Text Style


CSS (Cascading Style Sheets) describes how HTML elements are to be displayed on screen and control the layout of multiple web pages all at once.


css can either be attached as a separate document or embedded in the HTML document itself. These are the 2 methods of implementing styling information to an HTML document.


  • Using the <style> tag in the head section or the body section of the document.

  • Using the <link> to build direction to an external CSS files


  • 4.1 Inline Styles


    Inline styles are used to add a style=" " element in the text heading. Each property: value pair is separated by a semicolon (;)

    Here is an example:


    See the Pen Text Style by yummysheep (@jerry666320) on CodePen.

    Explanation of the code

  • style=" " is the text style tag in the text headings.

  • color makes changes of the colour of the texts. For example, color:red

  • font-size makes changes of the size of the texts.

  • text-align means the location of your text on the display screen.


  • 4.2 Linking External Style Sheets


    An external style sheet can be linked to an HTML document using the link tag.
    The link tag goes inside the head section, as shown here: