Anatomy of HTML Flashcards
What does HTML stand for?
Hyper Text Markup Language
What does HTML stand for?
Hyper Text Markup Language
What’s a good way to think about HTML?
You take content and wrap it in the appropriate tags.
What is an Element?
An HTML element usually consists of some content (could be plain text or additional HTML elements) wrapped by opening and closing tags.
Ex: <div></div>
<a></a>
there are more.
What is a tag?
A tag encapsulates an element.
Ex :< (opening tag)
Ex: > (closing tag)
What is an opening tag?
What is a closing tag?
>
What’s a good way to think about HTML?
You take content and wrap it in the appropriate tags.
What is an Element?
An HTML element usually consists of some content (could be plain text or additional HTML elements) wrapped by opening and closing tags.
Ex: <div></div>
<a></a>
there are more.
What is a tag?
A tag encapsulates an element.
Ex :< (opening tag)
Ex: > (closing tag)
What is an opening tag?
What is a closing tag?
>
What are self-closing element?
While most elements need op/cl tags, self-closing elements do not.
Ex: <img></img>
Coded out ex: p>This paragraph has an image: <img></img>
or
Ex: <br></br>
This element just inserts a line in the code document
What are attributes?
Attributes are for setting properties on an HTML element.
ex:
<h2>Favorite Songs</h2>
Playlist 1 is the attribute I’ve given to this level 2 headig
What do HTML attributes look like?
HTML attributes consist of a name (e.g., href) and a value enclosed in quotes (e.g., “https://www.somewhere.com”).
What are examples of attributes:
These are a few:
href, id, class
Can attributes be used on all elements?
No -BUT they can be used on most of them.
Especially attributes Class and ID, they are very user friendly, However there are some elements that will not take attributes of any kind.
What Elements will not accept Attributes?
,
).
What does an HTML document do? (1/2)
An HTML document specifies each and every one of its elements. These can be visible elements (paragraphs and images) or ones that human users never see (for instance, elements appearing in the head of the document).
What is commenting out code?
Developers commonly need to add what are called comments to code. A code comment is a line of text that is used to document some feature or oddity of a given piece of code for fellow project collaborators.
What does the HTML Elemental Hierarchy usually look like?
SEE Tlesson 2.1 for hierarchal diagram.
What are Heading Elements>
They are used to establish information hierarchy.
ex: <h1>, <h2>, <h3>,<h4>,<h5>
</h5></h4></h3></h2></h1>
Can i use H1 more than once?
Can you, technically yes but should you? NOOOOO.
Each HTML document should have only one <h1>header element just like there should on be one element.</h1>
Is it okay to skip around with heading levels in the HTML document?
No. You should go in progressive order, <h1> to <h5>
You can use heading levels <h2> to <h5> repeatedly however.
Remember, <h1> should on be used one per HTML document. </h1></h5></h2></h5></h1>