HTML Basics Flashcards
HTML meaning
HyperText Markup Language
Opening tag
Starts with only two arrows: <p>
Closing tag
End with two arrows and a slash: </p>
Body
Body of the code: <body> and </body>
Division
Short for division (div)
Divides the page into sections
Useful for grouping elements in your HTML: <div> </div>
Headings
<h1>:main heading
<h2>:second heading
<h3>,<h4>,<h5>,<h6>: All the same size headings
</h6></h5></h4></h3></h2></h1>
Attributes
Content is added to the opening tag of an element and can be used in several different ways, from providing information to changing styling. Made up of the following 2 parts: Name and Value.
ID: added between <div.....> Example: <div id="intro"></div.....>
Displaying Text
<p> and </p>
<span> and </span>
Styling Text
<em> and </em>: Italic <strong> and </strong>: Bold
Line Break
Causes a line break. <br></br>, you do not need to use a slash for this
Unordered List
<ul>: to create a list of items in no particular order. An unordered list outlines individual list items with a bullet point. The <li> or list item tag is used to describe an item in a list.
</li></ul>
Ordered List
Ordered lists (<ol>) are like unordered lists, except that each list item is numbered. They are useful when you need to list different steps in a process or rank items for first to last.
You can create the ordered list with the <ol> tag and then add individual list items to the list using <li> tags.
Images
<img></img>
Image Alts
The alt attribute, which means alternative text, brings meaning to the images on our sites. The alt attribute can be added to the image tag just like the src attribute. The value of alt should be a description of the image.
Example: <img></img>
Videos
<video>
Video not supported
</video>
Another Example:
video src=”https://content.codecademy.com/courses/freelance-1/unit-1/lesson-2/htmlcss1-vid_brown-bear.mp4” width=”320” height=”240” controls>
Video not supported
</video>