CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress
CSS Tutorials

Overview

CSS can be used to style text by changing the font, color, size, weight, spacing, alignment, and more.

HTML Tags

HTML provides a few tags that are used to give text special meaning and the browser will often style this text differently depending on what tag is used. These tags are more for marking up text in a semantic way so that the browser understands the meaning of each section of text.

Below are a few of the HTML tags most often used.

				
					<b>This text is bold.</b>

<strong>This text is important!</strong>

<i>This text is italicized.</i>

<em>This text is emphasized.</em>

<u>This text is underlined because it is missspelled.</u>

<small>This is some smaller text.</small>
				
			

These tags are not meant to exist on their own. They are meant to be placed within heading tags or paragraph tags.

				
					<p>This text is <strong>important!</strong></p>
				
			

Styling Text with CSS

Below are several examples of stying text using CSS. They include setting the text color, font-size, font-weight, font-style, text-alignment, and text-transform.

				
					/* all headings will have red, bold text */
h1, h2, h3, h4, h5, h6 {
    color: red;
    font-weight: bold;
}
				
			
				
					/* all paragraphs will have a font size of 18px; */
p {
    font-size: 18px;
}
				
			
				
					/* text with the class .our_mission will be italicized and centered 
in its parent element */
.our_mission {
    text-align: center;
    font-style: italic;
}
				
			
				
					/* text within the HTML small tag will be 80% as big as its parent
element text, green, and transformed to all uppercase */
small {
    color: green;
    font-size: 80%;
    text-transform: uppercase;
}
				
			

Text Properties

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.