HTML Notes
HTML Notes
<body>
<p>Henlo</p>
</body>
elements-
starting point<body>
ending point</body>
hierarchy-
body (parent)
div
h1
p
div
body (all children elements)
H1 or (Headers)-------------
1 <h1> (mainheadings)
2 <h2>
3 <h3>
4 <h4>
5 <h5>
6 <h6>
Divs-------------
if you want to apply STYLES for elements inside, you can use <div>
Attributes
attribute: id
helps identify content on our page
<div id="intro">
Displaying Text
Styling Text
Line Breaks
Unordered Lists
make paragraphs into easy to read list
ex:
<ul>
<li>Word</li>
<ul>
Ordered List
Images
src must be set to the images source or the location of the image.
EXAMPLE
<img src="https://content.codecademy.com/courses/web-101/web101-
image_brownbear.jpg"
/>
Image Alts
in order to make a website more inclusive, we need screen readers to easily read
image tags
alt attribute (alternative text) brings meaning to the images
note: should be a description of the image
example: <img src="Location" alt="Desc"/>
uses:
1. if an image fails to load, you can hover to see the description
2. visually impaired users can access a screen reading software
3. can improve the ranking of your site based of "SEO" (optimization)
Videos
width and height attributes used to set resolution. control attribute instructs to
basic video controls: play, pause, skip.
html attribute makes it so that browserd could interpret your text into html code
<html>
</html>