HTML, how can i create link in HTML ? |
HTML, how can i create link in HTML ? |
A.Samad |
Mar 3 2018, 11:06 AM
Post
#1
|
Group: Members Posts: 4 Joined: 3-March 18 Member No.: 26,603 |
<a> href="index.html"> click here </a>
in this tag where i'm making mistake ?? |
CharlesEF |
Mar 3 2018, 02:31 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Your problem is invalid HTML. See this page.
|
pandy |
Mar 5 2018, 12:44 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
The general concept is that elements have a start tag and a closing tag, both denoted by < and >. The closing tag also has a slash, /. Any attributes (like in your case href) go inside the start tag, after the element name and separated with a space.
Like this. HTML <ElementName AttributeName1="AttributeValue1" AttributeName2="AttributeValue2">Content that can be text and/or other elements</ElementName> CamelCase just for clarity. Don't use it. It's ugly. Some elements lack closing tag, but they are exceptions and few. The start tag and the closing tag surround their content. We say that the element contains its content. This is important for understanding how HTML works. It's like circles within circles. HTML contains everything, for example BODY. BODY contains everything you can see on the page, for example headings an paragraphs. P (paragraph) contains text content but can also contain other (but far from all) elements. What element can, or sometimes must, contain what other elements is key. When it come to CSS, what you do to an element typically also affects the elements it contains. This last thing is easy to find in "our" HTML reference in a more readable than the W3C spec. If you for example look up TD you can see that it can contain most other elements and must be contained in a TR. If you don't know what block and inline are, click on the links there for an explanation. Contents: Inline elements, block-level elements Contained in: TR http://htmlhelp.com/reference/html40/tables/td.html |
A.Samad |
Mar 5 2018, 01:52 PM
Post
#4
|
Group: Members Posts: 4 Joined: 3-March 18 Member No.: 26,603 |
Hello, Thank you for your answer. Best Regards, |
A.Samad |
Mar 5 2018, 01:54 PM
Post
#5
|
Group: Members Posts: 4 Joined: 3-March 18 Member No.: 26,603 |
The general concept is that elements has a start tag and a closing tag, both denoted by < and >. The closing tag also has a slash, /. Any attributes (like in your case href) go inside the start tag, after the element name and separated with a space. Like this. HTML <ElementName AttributeName1="AttributeValue1" AttributeName2="AttributeValue2">Content that can be text and/or other elements</ElementName> CamelCase just for clarity. Don't use it. It's ugly. Some elements lack closing tag, but they are exceptions and few. The start tag and the closing tag surround their content. We say that the element contains its content. This is important for understanding how HTML works. It's like circles within circles. HTML contains everything, for example BODY. BODY contains everything you can see on the page, for example headings an paragraphs. P (paragraph) contains text content but can also contain other (but far from all) elements. What element can, or sometimes must, contain what other elements is key. When it come to CSS, what you do to an element typically also affects the elements it contains. This last thing is easy to find in "our" HTML reference in a more readable than the W3C spec. If you for example look up TD you can see that it can contain most other elements and must be contained in a TR. If you don't know what block and inline are, click on the links there for an explanation. Contents: Inline elements, block-level elements Contained in: TR http://htmlhelp.com/reference/html40/tables/td.html Hello, Thank you for your answer. Best Regards, |
Lo-Fi Version | Time is now: 24th April 2024 - 06:59 PM |