Level no.17
How to link internal document html ?
To link internal document we use anchor tab. Internal document means the file you created in Visual Studio Code and want to open with online server like we normally do.
Syntax
<a href="/"></a>
Code
<a href="/Code15"> Click on this to access code15 </a>
In this example the Code-15 is file which is saved in my html document just by clicking this you can open file in web-page.
How to open link on new tab?
For opening it on new tab anchor tag provide target property or attribute.This is used for telling the browser where should the linked document loaded.
Syntax
<a href="" target="_blank"> Hello World </a>
Extra Info.
1.Right click format document to set code view.
1.Right click format document to set code view.
2.Alt+down-arrow/up-arrow to drag data up/down.
3.You can open multiple similar elements of a tag. For this syntax is below:
syntax
p*4-Open 4 paragraph tags.
td*6-Open 6 table data tags.
br*2-Open 2 line break tags.
Like this you will similar multiple elements.
Table
Today I will tel you about creating table in html.
Syntax
<table>
<thead> For giving title/heading of table
<th> For table sub-heading </th>
</thead>
<tbody> For table body
<tr> table row in which we apply table data tag for entering data
<td> Hello to table data </td>
</tr>
<tbody>
</table>
There is nothing different but in this syntax the tags usage is more other than the previous one.
Strong and Emphasize Tag
Strong tag is similar to bold tag, this will hold the text when you apply strong tag.The element present inside the strong tag is refer to as strong element. Emphasize tag is used to emphasize the text, element written in emphasize tag is displayed in italic. We can change the writing format using CSS.
Syntax
Strong tag
<strong> </strong>
Emphasize Tag
<em> </em>
Code
Strong tag
<strong> Strawberry are red </strong>
Emphasize Tag
<em> Grapes are green</em>
HTML ENTITIES
There are some HTML entities. Which we are going to discuss here.
First one is . We have discussed this entity earlier.
Now,if we want to print tag in HTML we cannot print it because HTML take is as a tag and perform actions on it and greater than > and less than < are reserved symbols in HTML . So for this problem we use HTML entity to print tags.
Syntax:
< enter any tag >
Code:
This is paragraph tag < p >
Output:
This is paragraph tag <p>.
Comments
Post a Comment