HTML: Tag - TechOnTheNet
Có thể bạn quan tâm
Advertisement
- Home
- HTML
- Databases
- SQL
- Oracle / PLSQL
- SQL Server
- MySQL
- MariaDB
- PostgreSQL
- SQLite
- MS Office
- Excel
- Access
- Word
- Web Development
- HTML
- CSS
- JavaScript
- Color Picker
- Programming
- C Language
- More
- ASCII
- Unicode
- Linux
- UNIX
- Techie Humor
Advertisement
HTML Elements
- <!DOCTYPE>
- <a>
- <abbr>
- <address>
- <area>
- <article>
- <aside>
- <b>
- <base>
- <blockquote>
- <body>
- <br>
- <button>
- <canvas>
- <caption>
- <cite>
- <code>
- <col>
- <colgroup>
- <datalist>
- <dd>
- <del>
- <dfn>
- <div>
- <dl>
- <dt>
- <em>
- <embed>
- <fieldset>
- <footer>
- <form>
- <h1>
- <h2>
- <h3>
- <h4>
- <h5>
- <h6>
- <head>
- <header>
- <hr>
- <html>
- <i>
- <iframe>
- <img>
- <input>
- <ins>
- <kbd>
- <label>
- <legend>
- <li>
- <link>
- <main>
- <map>
- <mark>
- <marquee>
- <menu>
- <meta>
- <nav>
- <noscript>
- <object>
- <ol>
- <optgroup>
- <option>
- <p>
- <pre>
- <q>
- <s>
- <script>
- <section>
- <select>
- <small>
- <span>
- <strong>
- <style>
- <sub>
- <sup>
- <table>
- <tbody>
- <td>
- <tfoot>
- <th>
- <thead>
- <time>
- <title>
- <tr>
- <u>
- <ul>
Deprecated HTML Elements
- <acronym>
- <basefont>
- <big>
- <center>
- <font>
- <strike>
This HTML tutorial explains how to use the HTML element called the <small> tag with syntax and examples.
Description
The HTML <small> tag makes text one font size smaller in the HTML document. This tag is also commonly referred to as the <small> element.
Syntax
In HTML, the syntax for the <small> tag is:
<body> <p>This is a paragraph and <small>smaller text goes here</small></p> </body>Sample Output
Attributes
Only the Global Attributes apply to the <small> tag. There are no attributes that are specific to the <small> tag.
Note
- The HTML <small> element is found within the <body> tag.
- The <small> tag is used to make the text one size smaller (ie: from x-large to large, large to medium, medium to small).
- The <small> tag can not make the text smaller than the browser's minimum font size.
Browser Compatibility
The <small> tag has basic support with the following browsers:
- Chrome
- Android
- Firefox (Gecko)
- Firefox Mobile (Gecko)
- Internet Explorer (IE)
- Edge Mobile
- Opera
- Opera Mobile
- Safari (WebKit)
- Safari Mobile
Example
We will discuss the <small> tag below, exploring examples of how to use the <small> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.
- HTML5
- HTML4
- XHTML
HTML5 Document
If you created a new web page in HTML5, your <small> tag might look like this:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 Example by www.techonthenet.com</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph and <small>smaller text goes here</small></p> </body> </html>In this HTML5 Document example, we have created a <small> tag that encloses the text "smaller text goes here". This text would appear one font size smaller than the text "This is a paragraph and".
HTML 4.01 Transitional Document
If you created a new web page in HTML 4.01 Transitional, your <small> tag might look like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>HTML 4.01 Transitional Example by www.techonthenet.com</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph and <small>smaller text goes here</small></p> </body> </html>In this HTML 4.01 Transitional Document example, we have created a <small> tag that encloses the text "smaller text goes here". This text would appear one font size smaller than the text "This is a paragraph and".
XHTML 1.0 Transitional Document
If you created a new web page in XHTML 1.0 Transitional, your <small> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>XHMTL 1.0 Transitional Example by www.techonthenet.com</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph and <small>smaller text goes here</small></p> </body> </html>In this XHTML 1.0 Transitional Document example, we have created a <small> tag that encloses the text "smaller text goes here". This text would appear one font size smaller than the text "This is a paragraph and".
XHTML 1.0 Strict Document
If you created a new web page in XHTML 1.0 Strict, your <small> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>XHTML 1.0 Strict Example by www.techonthenet.com</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph and <small>smaller text goes here</small></p> </body> </html>In this XHTML 1.0 Strict Document example, we have created a <small> tag that encloses the text "smaller text goes here". This text would appear one font size smaller than the text "This is a paragraph and".
XHTML 1.1 Document
If you created a new web page in XHTML 1.1, your <small> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>XHTML 1.1 Example by www.techonthenet.com</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph and <small>smaller text goes here</small></p> </body> </html>In this XHTML 1.1 Document example, we have created a <small> tag that encloses the text "smaller text goes here". This text would appear one font size smaller than the text "This is a paragraph and".
NEXT: <code> Share on:Advertisement
Home | About Us | Contact Us | Testimonials | Donate
While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy.
Copyright © 2003-2024 TechOnTheNet.com. All rights reserved.
Từ khóa » Html5 Text Tag
-
List Of HTML5 Tags/Elements - Tutorial Republic
-
HTML Text Formatting - W3Schools
-
HTML Elements Reference - HTML: HyperText Markup Language
-
HTML Text Tag - Javatpoint
-
HTML Tags For Text - Flavio Copes
-
HTML5 - Tags Reference - Tutorialspoint
-
Alignment, Font Styles, And Horizontal Rules In HTML Documents
-
WebD2: Common HTML Tags - University Of Washington
-
Playing With HTML Paragraphs: Let's Show You Different Formatting ...
-
In HTML, How Can I Change The Size Of Text On My Web Page? - IU KB
-
What Is The Tag To Underline Text In HTML 5? - Quora
-
How To Bold, Italicize & Format Text In HTML - HubSpot Blog
-
HTML Font Size – How To Change Text Size With An HTML Tag
-
HTML
Tag - GeeksforGeeks