links within the page help
ok so im taking a udemy course, well a couple of them. but on one of them he is talking about links within the page. and he said take out the <p> tag and replace it with <a name"name"> then paragraph. but he didnt say if i needed to replace the ending </P> tag with a </a>tag so i went and looked at w3 school. it is showing using an id tag, it is for <h1> but should i use a <a> tag and instead of <p> or should i use the id tag? and how should i end that paragraph, which tag? if i use the <a> tag do i end it with </a>
I do not wholly understand your problem. Yes an <a> must be closed with an </a>, but you should not have a <p> tag inside an <a> tag. Also <a> should be used as a link, not as the target of a link. Use <div id="name"> or <p id="name"> as a target.
Does that answer your query?
Last edited by jedaisoul; 07-16-2014 at 05:12 PM.
ok i think so. the guy who is "teaching" the course on udemy. said to change out the <p> tag and use the <a> tag instead. but he never changed the ending tag so i was confused. i think i got it now. i was just really confused for a second. i dont know why the guy said use <a name="name"> instead of <a id="name">. its a stupid question looking back now, guess my mind is not working today lol
All tags need to be closed, either with an ending tag or they're "self-closing". For example, for links within a page:
I chose to link to a <div> but you can link to other HTML elements instead.
<!-- the id isn't used for re-directing but can be used for CSS styling -->
<a href = "#section1" id = "link1">Click to go to Section 1</a>
<!-- the ID in the <div> is used for referencing within an internal page
but also can be used for CSS styling -->
<div id = "section1">
ok thanks i apperciate it i really dont know why it confused me so much. thank you error404 i apperciate you using code to show me so i can look at it and study it.
id is used for the identity . <a> is used for linking with href .<p> is simply for paragraph text .it is a very easy part of html ,
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)