-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes For HTML.html
More file actions
129 lines (59 loc) · 4.63 KB
/
Copy pathNotes For HTML.html
File metadata and controls
129 lines (59 loc) · 4.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Notes For HTML
The <head> element is a container for metadata pertaining to the HTML document itself, and should be placed between the opening <html> tag and the opening <body> tag.
Head elements can contain:
Titles
Scripts (a computer program that is to be run by the browser)
File attachments (such as CSS files, JavaScript files or even custom fonts)
Character encoding
Meta data
The head element is typically placed near the top of an HTML file.
EMBEDDED CONTENT
To embed means to fix something inside another thing. Content from another source that is included as part of a page is referred to as “embedded content.” This typically refers to content that exists on another website.
A common example is an embedded video. This would be like taking a video from YouTube and displaying it on your website.
The content placed between <body> and </body> tags makes up most of the content on the page. It consists of nearly anything the developer can dream of, such as: embedded video, images, text, animation, tables of data, advertisements, even music. The sky’s the limit, but within the body tag is where you'll place it.
Here is an example:
<body>
this is where the content of the page goes. It can be text, images, videos, or anything else you want to include on your webpage.
</body>
*// The Basic Structure of an HTML Document*
<!DOCTYPE html>
<html lang="en"></html>
<head>
<title>My First HTML Page</title>
The content placed between <body> and </body> tags makes up most of the content on the page. It consists of nearly anything the developer can dream of, such as: embedded video, images, text, animation, tables of data, advertisements, even music. The sky’s the limit, but within the body tag is where you'll place it.
<meta charset=""utf-8"
</head>
<body>
this is where the content of the page goes. It can be text, images, videos, or anything else you want to include on your webpage.
</body>
</html>
A footer is literally text that appears at the foot (bottom) of each page in a book or document.
The <footer> tag defines a footer for a document or section.
A footer element typically contains: authorship information, terms and conditions, copyright information, contact information and links to a company’s social media accounts. The bottom of most websites is the footer.
It is an important part of a webpage because it is usually used to give the user information needed to contact the primary owner or manager of the website.
The HTML <main> element represents the most important content of the <body> of a document or portion of a document. It consists of content that is directly related to or expands upon the central topic of a document.
For example:
On a blog post, for example, the <main> element would be where the article is placed. There should only be one “main” element per HTML page.
<h1> vs <p>
Both are HTML elements, but they serve very different purposes:
<h1> (Heading 1)
Used for titles or headings
Represents the most important heading on a page
Browsers render it large and bold by default
Helps with SEO and accessibility (screen readers use headings to navigate)
<p> (Paragraph)
Used for regular text content
Represents a block of text
Rendered as normal body text with spacing
D ATTRIBUTE
“Id” is short for “identification.” One of the most popular attributes is the id attribute.
The id attribute specifies a unique name for an HTML element.
For example, you can assign a specific <p> element the id (name) “paragraph” as follows:
Now that you have that id, you can reference (bring up; refer to) it in your code later.
You will learn exactly how to do this and why it's useful in an upcoming step.
Ids are specific and you can only utilize one id per element. For example, you cannot assign the same <h1> element two different ids. Also, you cannot use the same id name for two different elements. For example, this would be incorrect:
Ids must be specific to one element and cannot contain any spaces.
ANCHOR TAGS
The anchor <a> element is the HTML code used to create a link to another page. It instructs the browser to display content from another document (typically a web page).
As a note, in older versions of HTML, the word anchor meant what element means now (opening and closing tags and the text in between). Anchor text is the clickable text that is displayed. For example, in this link the anchor text is “The Tech Academy”:
The anchor element needs an attribute called an “href attribute.” “Href” is short for “hypertext reference.” This attribute contains the location of the resource or document that the author intends to link to.