<a> and <p> tags


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-html-css/lessons/css-setup/exercises/style?action=lesson_resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

```

HTML question

What is the difference between the <a> tag and the <p> tag? I’ve noticed, realized by myself (so maybe it’s not the best explanation), that both cause the same effect.

<do not remove the three backticks above>

#2

they are quit different, <p> is a paragraph element (for a paragraph of text) while <a> is the anchor element, if given an href attribute, it can be clicked and you will be redirected to that page:

<a href="https://google.com">google</a>

will take you to google if present on a website

for more information see:


also, anchor elements are inline so two anchor elements in a row will be on the same line

paragraph elements are block level, two paragraphs will sit below each other. (you will learn more about block vs inline later)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.