HTML <font> Tag

337    Share

Colors, Fonts and Sizes


Here, we will demonstrate some commonly used CSS properties. You will learn more about them later.

The CSS color property defines the text color to be used.

The CSS font-family property defines the font to be used.

The CSS font-size property defines the text size to be used.


Live Demo & Try it yourself! Read More » »

Comments


The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.

Comments are some text or code written in your code to give an explanation about the code, and not visible to the user. Comments which are used for HTML file are known as HTML comments. Anything written between these tags will be ignored by the browser, so comments will not be visible on the webpage.


HTML Comment Tag

You can add comments to your HTML source by using the following syntax:

<!-- Write your comments here -->

Notice that there is an exclamation point (!) in the start tag, but not in the end tag.


Live Demo & Try it yourself! Read More » »

Monospaced Font


ਜਿਆਦਾਤਰ ਫੌਂਟਸ ਵਿੱਚ ਵੱਖੋ ਵੱਖਰੇ ਅੱਖਰਾਂ ਦੀ ਚੌੜਾਈ ਵੱਖਰੀ (variable-width) ਹੁੰਦੀ ਹੈ, (ਉਦਾਹਰਣ ਲਈ: 'w' ਦੀ ਚੌੜਾਈ  'i' ਤੋਂ  ਜ਼ਿਆਦਾ ਹੁੰਦੀ ਹੈ) । ਪਰੰਤੂ ਮੋਨੋਸਪੇਸ਼ਡ ਫੌਂਟ ਵਿੱਚ ਸਾਰੇ ਅੱਖਰ ਇਕੋ  ਬਰਾਬਰ ਚੌੜਾਈ ਦੇ ਹੁੰਦੇ ਹਨ। ਜੇਕਰ ਅਸੀਂ ਚਾਹੁੰਦੇ ਹਾਂ ਕਿ ਹਰੇਕ ਅੱਖਰ ਦੀ ਚੌੜਾਈ ਇਕੋ ਜਿਹੀ ਹੋਵੇ ਤਾਂ ਸਾਨੂੰ ਟੈਕਸਟ ਕੰਟੈਟਸ ਨੂੰ <tt ...</tt> ਟੈਗਜ਼ ਦੇ ਵਿਚਕਾਰ ਲਿਖਣਾ ਚਾਹੀਦਾ ਹੈ। <tt> ਟੈਗ ਟੈਲੀਟਾਈਪ (teletype text) ਦਾ ਸੰਖੇਪ ਰੂਪ ਹੈ।


Live Demo & Try it yourself! Read More » »

Working with big and small fonts


HTML ਵਿੱਚ <big> ਟੈਗ ਦੀ ਵਰਤੋਂ ਫੌਂਟ ਸਾਈਜ਼ ਨੂੰ ਡਾਕੂਮੈਂਟ ਦੇ ਬੋਸ-ਫੌਂਟ ਸਾਈਜ਼ (Base Font Size) ਜਾਂ ਆਦ ਦੁਆਲੇ ਦੇ ਟੈਕਸਟ ਸਾਈਜ਼ (ਆਕਾਰ) ਨਾਲੋਂ ਇੱਕ ਲੇਵਲ ਵੱਡਾ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ, ਜਿਵੇਂ ਕਿ ਛੋਟੇ ਦਰਮਿਆਨਾ (Small to Medium) ਲੈਵਲ, ਦਰਮਿਆਨੇ ਤੋਂ ਵੱਡਾ (Medium to Large) ਲੈਵਲ, ਵੱਡੇ ਤ ਐਕਸਟਰਾ ਵੱਡਾ ਲੈਵਲ (Large to X-Large) ਆਦਿ । HTML5 ਦੁਆਰਾ ਇਸ ਟੈਗ ਨੂੰ ਸਪੋਰਟ ਨਹੀਂ ਕੀਤੀ ਜਾਂਦੀ ਇਸ ਤਰ੍ਹਾਂ HTML ਵਿੱਚ <Small> ਟੈਗ ਦੀ ਵਰਤੋਂ ਫੌਂਟ ਸਾਈਜ਼ ਨੂੰ ਡਾਕੂਮੈਂਟ ਦੇ ਬੇਸ-ਫੌਂਟ ਸਾਈਜ਼ ਜਾਂ ਆ ਦੁਆਲੇ ਦੇ ਟੈਕਸਟ ਸਾਈਜ਼ ਨਾਲੋਂ ਇੱਕ ਲੈਵਲ ਛੋਟਾ ਕਰਨ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ, ਜਿਵੇਂ ਕਿ ਐਕਸ-ਵੱਡੇ ਤੋਂ ਵੱ (X-Large to Large) ਲੈਵਲ, ਵੱਡੇ ਤੋਂ ਦਰਮਿਆਨਾ ਲੈਵਲ (Large to Medium), ਮੱਧਮ ਤੋਂ ਛੋਟਾ (Medium Small) ਲੈਵਲ ਆਦਿ। HTML5 ਦੁਆਰਾ <Small> ਟੈਗ ਨੂੰ ਵੀ ਹੁਣ ਸਪੋਰਟ ਨਹੀਂ ਕੀਤਾ ਜਾਂਦਾ। ਇਹ ਦੋਵੇਂ ਟੈਗਜ਼ ਪੇਅਰਡ ਟੈਗ ਹਨ। ਹੇਠਾਂ ਦਿੱਤਾ HTML ਪ੍ਰੋਗਰਾਮ ਇਹਨਾਂ ਟੈਗਜ਼ ਦੀ ਵਰਤੋਂ ਨੂੰ ਦਰਸਾਉਂਦਾ ਹੈ:

<head>

Etituigger and Smaller Text Examles/titles

</head>

This is an example of big Bigger Texts/big><b> This is an example of samallaller Texts/smalle

</body>


Live Demo & Try it yourself! Read More » »

Working with Fonts


HTML ਦਸਤਾਵੇਜਾਂ ਵਿੱਚ ਫੋਂਟਸ ਨਾਲ ਕੰਮ ਕਰਨ ਲਈ ਅਸੀਂ <font- ਟੈਗ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹਾਂ। ਇੱਕ ਆਕਰਸ਼ਕ ਅਤੇ ਪੜ੍ਹਨਯੋਗ ਵੈੱਬ ਪੇਜ਼ ਬਣਾਉਣ ਲਈ <dont> ਟੈਗ ਮਹੱਤਵਪੂਰਣ ਭੂਮਿਕਾ ਅਦਾ ਕਰਦਾ ਹੈ। ਇਹ ਟੈਗ ਟੈਕਸਟ ਦੇ ਰੰਗ, ਆਕਾਰ ਅਤੇ ਸਟਾਈਲ (style) ਆਦਿ ਨੂੰ ਬਦਲਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ। ਇਸ ਟੈਗ ਦੇ ਤਿੰਨ ਮੁੱਖ ਐਟਰੀਬਿਊਟ ਇਸ ਪ੍ਰਕਾਰ ਹਨ :

  1. Color:  ਇਸ ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਟੈਕਸਟ ਦਾ ਰੰਗ (color) ਬਦਲਣ ਲਈ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਰੰਗ ਬਦਲਣ ਲਈ ਹਕਸਾਡੇਸਿਮਲ ਕੋਡ (Hexadecimal Code) ਜਾਂ ਰੰਗ ਦੇ ਨਾਮ (Black, Red, White ਆਦਿ) ਦੀ ਵਰਤੋਂ ਕੀਤੀ ਜਾ ਸਕਦੀ ਹੈ।
  2. Face : ਇਹ ਐਟਰੀਬਿਊਟ ਫੌਂਟ ਦਾ ਚਿਹਰਾ (font face) ਬਦਲਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ। ਜੇਕਰ ਵੈੱਬਪੇਜ ਨੂੰ ਦੇਖਣ ਵਾਲੇ ਯੂਜ਼ਰ ਦੇ ਕੰਪਿਊਟਰ ਵਿੱਚ ਫੌਂਟ ਮੌਜੂਦ ਨਾ ਹੋਵੇ, ਤਾਂ ਯੂਜ਼ਰ ਦੇ ਕੰਪਿਊਟਰ ਦੇ ਡਿਫਾਲਟ ਵੋਟ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ ਵੈੱਬ ਪੇਜ ਦੇ ਟੈਕਸਟ ਨੂੰ ਦਰਸਾਇਆ ਜਾਵੇਗਾ।
  3. Size ਇਹ ਐਟਰੀਬਿਊਟ ਫੌਂਟ ਦੇ ਆਕਾਰ (size) ਨੂੰ ਬਦਲਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ। ਫੌਂਟ ਦਾ ਆਕਾਰ ਜਾਂ ਤਾਂ ਨੂਮੇਰਿਕ (Numeric) ਜਾਂ ਰੇਲੇਟਿਵ (Relative) ਮੁੱਲ ਵਜੋਂ ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ। ਨੁਮੋਰਿਕ ਮੁੱਲਾਂ ਦੀ ਸੀਮਾ 1 (ਸਭ ਤੋਂ ਛੋਟੀ) ਤੋਂ 7 (ਸਭ ਤੋਂ ਵੱਡੀ) ਤੱਕ ਹੁੰਦੀ ਹੈ। ਫੁੱਟ ਦਾ ਡਿਫਾਲਟ ਆਕਾਰ 3 ਹੁੰਦਾ ਹੈ। ਅਸੀਂ ਰੇਲੇਟਿਵ ਮੁੱਲਾਂ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਵੀ ਫੋਟ ਦਾ ਆਕਾਰ ਸੈੱਟ ਕਰ ਸਕਦੇ ਹਾਂ, ਜਿਵੇਂ ਕਿ 1 (ਪਹਿਲਾਂ-ਸੈੱਟ ਕੀਤੇ ਛੋਟ ਆਕਾਰ ਨਾਲੋਂ ਇੱਕ ਪੁਆਇਟ ਫੁੱਟ ਦਾ ਆਕਾਰ ਵਧਾਉਣ ਲਈ) ਜਾਂ-2 (ਪਹਿਲਾਂ-ਸੈੱਟ ਕੀਤੇ ਫੌਂਟ ਆਕਾਰ ਨਾਲ 2 ਪੁਆਇੰਟ ਫੁੱਟ ਦਾ ਆਕਾਰ ਘਟਾਉਣ ਲਈ) ਆਦਿ।

ਵੈੱਬਪੇਜ ਵਿੱਚ ਫੌਂਟ ਦੇ ਕਿਸੇ ਵੀ ਐਟਰੀਬਿਊਟ ਨੂੰ ਸੈੱਟ ਕਰਨ ਲਈ <font> ਟੈਗ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ। HTML 5 ਵਿੱਚ <font> ਟੰਗ ਪੁਰਾਣਾ (obsolete) ਹੋ ਚੁੱਕਿਆ ਹੈ।


Live Demo & Try it yourself! Read More » »