HTML Text Style
HTML Tutorial » HTML Text Style
We can add Style as:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the <head> section
External & External - by using an external CSS file as style.css
The HTML style attribute has the following syntax:
Syntax:
Inline Syntax - <tagname style="text-align: left|right|center|justify|initial|inherit;">Your HTML Text </tagname>
External & External - text-align: left|right|center|justify|initial|inherit;
Adding HTML Text Style using CSS inline - examples
Example:
Example 1 Adding HTML Text Style using CSS inline - examples:
<!DOCTYPE html>
<html>
<head>
<title>Adding HTML Text Style using CSS inline - example</title>
</head>
<body>
<h1>Adding HTML Text Style using CSS inline - examples </h1>
<span style="text-align:right; font-family:Courier; font-weight:bold; font-style:italic;
font-size:22; color:#33CCFF">Your text-align:center; using CSS inline</span>
<p style="text-align: right; font-style:italic; color:#33CCFF">example - Your text here:
text-align: right; font-style:italic; color:#33CCFF; using CSS inline</p>
<p style="text-align: left;">Example - Your text-align:left using CSS inline</p>
<p style="text-align: justify;">Example - Your text-align: justify; using CSS inline</p>
</body>
</html>
Note: You will learn more about CSS Style under css-tutorial.html in this tutorial.
Exampl with Text Style bold, font, color, cursive, calibri, italic, tags
Text Style using CSS internal - examples
Example:
Example 2 Text Style using CSS internal - exampless:
<!DOCTYPE html>
<html>
<head>
<title>Text Align left, center, right using CSS internal - examples</title> <style>
span {
text-align:right;
font-family: "Courier New", Courier, monospace;
font-size: 14px;
font-style: italic;
font-weight: bold;
color: #00CCFF;
text-decoration: none;
}
p {
text-align: right;
}
.text {
text-align: left;
font-size: 14px;
font-style: italic;
font-weight: bold;
color: #00CCFF;
}
</style>
</head>
<body>
<h1>Types of adding Adding HTML Text Size using CSS internal - examples</h1>
<span>Example - your text here using internal CSS style</span>
<p>Example - This is my HTML Text center align using internal CSS style</p>
<div class="text">example - This is my HTML Text right align using internal CSS style</div>
</body>
</html>
For external CSS style just make a file as style.css and replace
<style>
span {
text-align:right;
font-family: "Courier New", Courier, monospace;
font-size: 14px;
font-style: italic;
font-weight: bold;
color: #00CCFF;
text-decoration: none;
}
p {
text-align: right;
}
.text {
text-align: left;
text-align: left;
font-size: 14px;
font-style: italic;
font-weight: bold;
color: #00CCFF;
}
</style>
with <link rel="stylesheet" href="style.css" type="text/css"/>
HTML Text Style bold, font, color, cursive, calibri, italic, tags
HTML Text Style - html tutorial
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.