GSSS KHOKHAR Online HTML Editor
Write, Run & Share HTML code online using GSSS KHOKHAR HTML online Code editor for free.
About HTML
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<!DOCTYPE html>
<html>
<head>
<title>Simple HTML Program</title>
</head>
<body>
<h1>Simple HTML Program</h1>
<h2>GSSS KHOKHAR, Sri Muktsar Sahib</h2>
</body>
</html>
Now, Click on the RUN button and output will display in output framework.
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.
<a href="https://www.gssskhokhar.com/html/">HTML</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML
<script src="script.js"></script>
ਇੱਕ ਟੇਬਲ ਜਾਂ ਸੈੱਲ ਕੰਟੈਂਟਸ ਦੀ ਅਲਾਈਨਮੈਂਟ ਬਦਲਣਾ (Changing the Alignment of a Table or Cell Value):
ਅਲਾਈਨਮੈਂਟ ਦੋ ਤਰੀਕਿਆਂ ਨਾਲ ਸੈੱਟ ਕੀਤੀ ਜਾ ਸਕਦੀ ਹੈ: ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ (Horizontally) ਅਤੇ ਖੜਵੇਂ ਰੂਪ ਵਿੱਚ (Verically)। ਟੇਬਲ ਨੂੰ ਸਿਰਫ ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ ਅਲਾਈਨ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ ਜਦੋਂ ਕਿ ਸੈੱਲ ਕੰਟੈਂਟਸ ਨੂੰ ਲੇਟਵੇਂ ਅਤੇ ਖੜਵੇਂ ਦੋਵਾਂ ਤਰੀਕਿਆਂ ਨਾਲ ਅਲਾਈਨ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।HTML ਟੇਬਲਾਂ ਨਾਲ ਸੰਬੰਧਤ ਵੱਖ-ਵੱਖ ਟੈਗਜ਼ ਵਿੱਚ ਅਲਾਈਨਮੈਂਟ ਸੈੱਟ ਕਰਨ ਦੇ ਵੱਖ-ਵੱਖ ਤਰੀਕਿਆਂ ਸੰਬੰਧੀ ਜਾਣਕਾਰੀ ਹੇਠਾਂ ਦਿੱਤੀ ਗਈ ਹੈ
ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ ਅਲਾਈਨਮੈਂਟ ਸੈੱਟ ਕਰਨਾ (Setting Horizontal Alignment):
Align ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਅਸੀਂ ਟੇਬਲ ਅਤੇ ਇਸਦੇ ਸੈੱਲ ਕੰਟੈਂਟਸ ਦੀ ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ ਅਲਾਈਨਮੈਂਟ ਸੈੱਟ ਕਰ ਸਕਦੇ ਹਾਂ। HTML ਡਾਕੂਮੈਂਟ ਵਿੱਚ ਵਰਤੇ ਜਾਂਦੇ ਵੱਖ-ਵੱਖ ਟੇਬਲ ਟੈਗਜ਼ ਲਈ lien ਐਂਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਸੰਬੰਧੀ ਜਾਣਕਾਰੀ ਇਸ ਪ੍ਰਕਾਰ ਹੈ।
<table>: ਟੈਗ ਲਈ Align ਐਟਰੀਬਿਊਟ: ਮੂਲ ਰੂਪ ਵਿੱਚ (By default) ਟੇਬਲ ਵੈੱਬ ਪੇਜਾਂ ਵਿੱਚ ਖੱਬੇ ਪਾਸੇ ਵੱਲ ਅਲਾਈਨ ਦਿਖਾਇਆ ਜਾਂਦਾ ਹੈ। <able> ਟੈਗ ਵਿੱਚ align ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ ਅਸੀਂ ਟੇਬਲ ਦੀ ਅਲਾਈਨਮੈਂਟ ਨੂੰ ਲੇਟਵੀਂ ਰੂਪ ਵਿੱਚ ਬਦਲ ਸਕਦੇ ਹਾਂ। <table› ਟੈਗ ਲਈ align ਐਟਰੀਬਿਊਟ ਦੇ ਮੁੱਲ Right, Left, ਜਾਂ Center ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।
ਉਦਾਹਰਣ ਲਈ <table align=right">
<tr> ਟੈਗ ਲਈ Align ਐਟਰੀਬਿਊਟ: ਮੂਲ ਰੂਪ ਵਿੱਚ (By default) ਟੇਬਲ ਰੇਅਜ਼ ਵਿੱਚ ਸੈੱਲ ਡਾਟਾ ਖੱਬੇ ਪਾਸੇ ਅਲਾਈਨ ਦਿਖਾਇਆ ਜਾਂਦਾ ਹੈ।<> ਟੈਗ ਵਿੱਚ align ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹੋਏ ਅਸੀਂ ਰੋਅ ਦੇ ਸਾਰੇ ਸੈੱਲਾਂ ਦੇ ਕੰਟੈਂਟਸ ਦੀ ਅਲਾਈਨਮੈਂਟ ਸਟਵ ਰੂਪ ਵਿੱਚ ਬਦਲ ਸਕਦੇ ਹਾਂ। <i> ਟੈਗ ਲਈ align ਐਟਰੀਬਿਊਟ ਦਾ ਮੁੱਲ Right, Left, Center ਜਾਂ Justify ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।
ਉਦਾਹਰਣ ਲਈ, <tr align="center">
<td> ਅਤੇ <th> ਟੈਗ ਲਈ Align ਐਟਰੀਬਿਊਟ: ਮੂਲ ਰੂਪ ਵਿੱਚ (By default) <i> ਦੁਆਰਾ ਪਰਿਭਾਸ਼ਤ ਸੈਲ ਕੰਟੇਂਟਸ ਖੱਬੇ ਪਾਸੇ ਅਲਾਈਨ ਦਿਖਾਈ ਦਿੰਦੇ ਹਨ ਜਦੋਂ ਕਿ <th> ਦੁਆਰਾ ਪਰਿਭਾਸ਼ਿਤ ਸੈੱਲ ਕੰਟੇਟਸ ਲਈ ਡਿਫਾਲਟ ਅਲਾਈਨਮੈਂਟ ਸੈਂਟਰ ਹੁੰਦੀ ਹੈ। ਜੇ ਅਸੀਂ <td> ਜਾਂ<th> ਟੈਗਜ਼ ਵਿੱਚ lign ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਕਰਦੇ ਹਾਂ, ਤਾਂ ਇਹ ਉਸ ਖਾਸ ਸੈੱਲ ਦੀ ਲੇਟਵੇਂ ਰੂਪ ਵਿੱਚ ਅਲਾਈਨਮੈਂਟ ਨੂੰ ਬਦਲ ਦੇਵੇਗਾ ਜਿਸ ਤੇ ਇਹ ਲਾਗੂ ਕੀਤਾ ਗਿਆ ਹੈ। <d> ਅਤੇ <th> ਟੈਗਜ਼ ਵਿੱਚ align ਐਟਰੀਬਿਊਟ ਦਾ ਮੁੱਲ Right, Left, Center ਜਾਂ Justify ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।
ਉਦਾਹਰਣ ਲਈ <td align="center">
<caption> ਟੈਗ ਲਈ Align ਐਟਰੀਬਿਊਟ ਮੂਲ ਰੂਪ ਵਿੱਚ ਇੱਕ ਟੇਬਲ ਟਾਈਟਲ ਸੈਂਟਰ ਅਲਾਈਨਡ ਹੁੰਦਾ ਹੈ ਅਤੇ ਟੇਬਲ ਦੇ ਉੱਪਰ ਦਿਖਾਇਆ ਜਾਂਦਾ ਹੈ। Align ਐਂਟਰੀਬਿਊਟ ਨਾਲ ਟੇਬਲ ਦੇ ਟਾਈਟਲ ਦੀ ਅਲਾਈਨਮੈਂਟ ਨੂੰ ਟੇਬਲ ਦੇ ਉੱਪਰ ਜਾਂ ਨਿਚਲੇ ਪਾਸੇ ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ। ਆਮ ਤੌਰ ਤੇ <caption> ਟੈਗ ਲਈ align ਐਟਰੀਬਿਊਟ ਦਾ ਮੁੱਲ Top ਜਾਂ Bottom ਸੈੱਟ ਕੀਤਾ ਜਾਂਦਾ ਹੈ। ਜੇ ਅਸੀਂ align="Top" ਸੈੱਟ ਕਰਦੇ ਹਾਂ, ਤਾਂ ਟਾਈਟਲ ਟੇਬਲ ਦੇ ਉੱਪਰ ਪ੍ਰਦਰਸ਼ਿਤ ਕੀਤਾ ਜਾਵੇਗਾ ਅਤੇ ਜੇ ਅਸੀਂ ਚਾਹੁੰਦੇ ਹਾਂ ਕਿ ਟਾਈਟਲ ਟੇਬਲ ਦੇ ਹੇਠਾਂ ਪ੍ਰਦਰਸ਼ਿਤ ਹੋਵੇ ਤਾਂ ਅਸੀਂ <caption> ਟੈਗ ਲਈ align="Bottom" ਮੁੱਲ ਦੀ ਵਰਤੋਂ ਕਰ ਸਕਦੇ ਹਾਂ।ਪਰੰਤੂ align ਐਟਰੀਬਿਊਟ ਨੂੰ CSS ਸਟਾਈਲਸੀਟਾਂ ਦੀ ਵੱਧ ਰਹੀ ਵਰਤੋਂ ਕਾਰਨ HTML5 ਵਿੱਚ depreciate ਕੀਤਾ ਗਿਆ ਹੈ।
ਉਦਾਹਰਣ ਲਈ, <caption align="bottom">
<!DOCTYPE html>
<html>
<head>
<title>Changing the Alignment of a Table or Cell Value</title>
</head>
<body>
<h3>Changing the Alignment of a Table or Cell Value</h3>
<table width="80%" border="1">
<caption align="bottom">Student Information (Bottom Align)</caption>
<tr>
<th>#</th>
<th align="left">Name of Student</th>
<th align="left">Class</th>
</tr>
<tr>
<td align="right">1.</td>
<td>Taranpreet Singh</td>
<td align="center">6th</td>
</tr>
<tr>
<td align="right">right align</td>
<td align="left">left align</td>
<td align="center">center align</td>
</tr>
</table>
</body>
</html>