Could I use a src attribute on a <p> tag to load in raw text?

Question

Could I use a src attribute on a p tag to load in raw text?

Answer

No. Unlike some other global attributes which you will learn about in lesson 2, the src attribute can only be applied to specific tags of which the p tag is not included. In other words, not all attributes are available to every tag. To find out which attributes are available to every tag, take a look at this list of global attributes.

What is the difference between src and href? they seem to have a similar function

A src attribute points to a resource that will be downloaded and inserted into the page at the given position (normal flow by default). Elements that have a src attribute include,

img
video
audio
source
script

The href attribute is an hypertext reference to a resource situated on the web, such as a web page or a style sheet. Elements that have an href attribute include,

a
link
blockquote
cite
q

Correction

blockquote uses the cite attribute

cite does not have an href attribute.

q uses the cite attribute.