ASP.NET Basics

HTML Basics
ASP.NET Web Server
Advanced HTML
Application Designing
Using Visual Studio
ASP.NET Standards
ASP.NET Styling
ASP.NET Navigation

ASP.NET Tips

ASP.NET Validation
HTML forms
CSS Styling
CSS Advanced
ASP.NET Features
ASP.NET Image Effects
Common mistakes
DB Design tips

Building Applications

Design Secure Apps
Build Secure Apps

1. HTML Span - <span> tag

« Previous Chapter

Next Chapter »

The most commonly used and a quick style applying tag is the HTML “<span>” tag. Even though it is a very basic tag, you can used this tag to specify the color, size, and the font of the text, even if the Text has an style already assigned to it using the <p>, <h1>, <h2> or any other tags. Even though this type of styling is obsolete and many developers don’t use it now, it still provides an easy way of editing the look and feel of your web page without editing the Style Sheets.

The following is a code snippet showing the change of the font Face using the span tag.

<p>Paragraph Sample Text Here <span style=" font-family:Arial, Sans-Serif;">Span Sample Text Here.</span></p>

Note:

  • As a good programming practice, it is always good to specify web Fonts, and the type of the Font, whether it’s a Serif or a Sans-Serif. This is because, if the type was not specified, and the font you mentioned was missing in the computer rendering the web page, the web pages appearance could change

  • What happens now is the web page tells the browser to first display the text in Arial, and if this was not found, it will look for any font which is of type San-Serif. This allows you to have more controls over the appearance of the webpages across all browsers and users.

« Previous Chapter

Next Chapter »

Table of Contents

» Chapter 1 - HTML Span - <span> tag
Chapter 2 - HTML Bold, Italic, Underline and Strikethrough
        Chapter 2.1 - HTML Bold - <b> tag & <strong> tag
        Chapter 2.2 - HTML Italics - <i> tag & <em> tag
        Chapter 2.3 - HTML Underline - <u> tag
Chapter 3 - HTML Subscript and Superscript - <sup> tag & <sub> tag
Chapter 4 - HTML Preformatted Text - <pre> tag
Chapter 5 - HTML Lists tag
        Chapter 5.1 - HTML Unordered Lists - <ul> tag
                Chapter 5.1.1 - HTML Nested Unordered Lists
        Chapter 5.2 - HTML Ordered Lists - <ol> tag
Chapter 6 - HTML Headings tags
Chapter 7 - HTML Base tag

[top]