Style

Styling can be applied by using:

  • External CSS style sheet . Preferred method!
  • Internal CSS style sheet, using the <style> element in the head section of the document
  • Inline style attribute
  • Scripting

 

 

External Style Sheet

 

Using a <link> tag in the head section of the document:

 

 

Internal Style Sheet

 

Defined in the <head> section of the document, using the <style> element:

 

 

Inline styling

 

Defined by applying the style attribute within an element, e.g.

 

<p style="color: blue; font-size: 2em;">My text goes here.</p>

 

Will render asĀ My text goes here.

 

Leave a Reply