HTML Flashcards
(53 cards)
What does HTML stand for?
Hypertext Markup Language
Tag
Basic building block of HTML, describes content.
Opening Tag
Starts an HTML element, e.g., <h1>.
Closing Tag
Ends an HTML element, e.g., </h1>.
Self-Closing Tag
Tag that doesn’t require a closing counterpart.
How to structure tags?
Always close the most recently opened tag first
How to add a heading?
<h1>This is a heading</h1>
How many headings are there?
<h1> to <h6>, <h1> being the heading and the rest being subheadings
</h1></h6></h1>
How to use a paragraph tag?
<p></p>
What is the <div> tag?
Like a box. It has no meaning, but is given meaning on what is inside it.
What is the <span> tag?</span>
Like a <div> tag, but for style
What is the difference between a <div> tag and a <span> tag?</span>
<div> - whole width of the screen
<span> - hugs the content
</span></div>
What does <li> do?
Represents the item within a list
Ordered List
<ol> tag for numbered lists.
</ol>
Unordered List
<ul> tag for bulleted lists.
</ul>
How to use <ol> tags?
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
will output
1. Coffee
2. Tea
3. Milk
How to use <ul> tags>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
will output
* Coffee
* Tea
* Milk
Button Tag
<button>Click me!</button>
Image Tag
<img></img>
src Attribute
Specifies the image source URL.
alt Attribute
Describes the image for accessibility.
<table></table>
Creates container for a table
<thead></thead>
Container for header row
<tbody></tbody>
Container for main body
Company | Contact | Country |
---|---|---|
Alfreds Futterkiste | Maria Anders | Germany |
Centro comercial Moctezuma | Francisco Chang | Mexico |
Ernst Handel | Roland Mendel | Austria |
Island Trading | Helen Bennett | UK |
Laughing Bacchus Winecellars | Yoshi Tannamuri | Canada |
Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |