If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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.

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:

HTML Code:

<!-- 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"><p>some stuff</p></div>

I chose to link to a <div> but you can link to other HTML elements instead.