HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

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

3069. Website Hosting
Learn about web site hosting with this HTML tutorial.
https://www.quackit.com/html/tutorial/website_hosting.cfm

3205. HTML image, size, link and image background, html tutorial
HTML image, size, link and image background html tutorial
https://www.agernic.com/html-tutorial/HTML-image-size-link-and-image-background.html

2638. Frames : Basic Example - HTML Tutorial
HTML frames - HTML tutorial
http://www.echoecho.com/htmlframes01.htm

2635. Forms : Image Button - HTML Tutorial
HTML forms - HTML tutorial
http://www.echoecho.com/htmlforms14.htm

2672. Links : Links in Framesets - HTML Tutorial
HTML links - HTML tutorial
http://www.echoecho.com/htmllinks09.htm

2143. HTML Tutorial - <pre> ( preformatting ) Tag
Pre tag notepad formatting
https://tutorialehtml.com/en/html-tutorial-pre-preformatting/

Your add here
PHP strip_tags() function

PHP define() function

PHP str_replace() function

PHP substr() function

PHP md5() function

PHP rtrim() function

PHP ucfirst() function

PHP htmlspecialchars() function

PHP wordwrap() function

PHP ucwords() function

PHP strcmp() function

PHP htmlentities() function

PHP strstr() function

PHP printf() function

PHP strtoupper() function

PHP html_entity_decode() function

CSS Text Wrap
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
PHP Syntax
HTML div border color
HTML Table Color
CSS Margin, top, bottom, left, righ, auto