HTML Flashcards
non-visible content?
settings on the website, meta content, etc. ALL in <header>
visible content?
<p>, <h1>, <img></img> etc. All in <body>
</body></h1></p>
<!DOCTYPE>?
define this is a html 5 file
basic HTML-skeleton include?
<!DOCTYPE>
<head> </head>
<body> </body>
what is the element <title> does?</title>
define the name of the website shows on the tab
What is the purpose of HTML attributes?
Give each element different settings
HTML entity for >, < ?
>: <:
HTML entity for © ®?
© ®
How do block-level elements affect the document flow?
It’s gonna take entire row
How do inline elements affect the document flow?
It Just gonna effects its own part in line.
What are the default width and height of a block-level element?
height is zero varies on the content. default width is fitting on computer screen size.
Difference betwween (<ul> and <ol>?
<ul> doesn't care order.
<ol> will set numbers to the item.
</ol></ul>
What HTML tag is used to link to another website?
<a>xxxx</a>
absolute URL?
start from the root. use /xxx/xxx
relative URL?
start from the current location to another. all the webpage are require in one branch. To use, ../../ every ../ is jump to the parent folder.
<b> <i></i></b>
<b> stands for bold. <i> stand for italic.
<b> <i> is replace by <strong> <em></em></strong></i></b></i></b>
is to put word on the right top of another word.
Ex: a2 + b2 = c2
is to put word on the right bottom of another word.
Ex:
<br></br>
Start a new line
<hr></hr>
add a horizontal line between two lines
<q></q>
add “ in text. Not often use cause IE doesn’t support .
<cite></cite>
cite some things in text
<dfn></dfn>
define something in text
<abbr>xxx<?abbr></abbr>
add a comment box which you can define it by hover the mouse on some text
. .. in terminal
. means here
..means up by one parent directory
<form>
</form>
the action attribute in the <form> element means the URL for the page on the server that will receive the information in the form when it’s submitted
<form>
<form>
</form></form>
method attribute is the way of form been sent to the server.
“get” usually behind the “action” URL. use for Short form, retrieving data, but not change or add them.
“post” usually sent by http headers. it can carry Long forms, The FILE user uploaded , sensitive data(passwords ), change or add data to the server.
<input></input>
creat several differet form controls. can be use in a lot of different ways with different attributes
<table> </table>
to create a table in the website
<thead> </thead>
<tbody> </tbody>
<tfoot> </tfoot>
<thead> is to set the table head content. should include <tr> <th>
<tbody> is to set the table body content. should include <tr> <td>
<tfoot> is to set the table foot content. should include <tr> <th>
</th></tr></tfoot></td></tr></tbody></th></tr></thead>
<tr>
<th>
<td>
</td></th></tr>
stand for table row, table head, table data.
<td>xxxxx</td>
colspan attribute means a cell that take “x” amount of cell in row.
<td>xxxxx</td>
rowspan attribute means a cell that take “x” amount of cell in column
<input type=”text” name=”xxx” maxlength=”x”
type attribute in here means different input format. (text,password,radio,checkbox….)
name attributes in here means the data is store in the server under which part(the name defined in here)
maxlength attributes in here mean we can set the maximum number of characters of user can put in one time
<textarea> ?????</textarea>
textarea elements in here means a box where user can input a lot of sentences.
cols attribute in here means the vertical space the textarea is taken and rows attribute stand for horizontal spaces.
the text we enter in the middle(???) can be the placeholder in the textarea.
<th>xxx</th>
<td>xxx</td>
use to creat table head content on the side.
col is row
row is column
<input type=”radio” name=”??” value=”xxx” checked=”checked />
Type “radio” can create button that user are able to pick once. ⭕️xx ⭕️xx ⭕️xx (can’t be deselected once the user press the button)
name is the data is store in the server under which part(the name defined in here)
value attribute means the value that is sent to the server for the selected option. (You can give the button a fun name but the value is the actual meaning of the button)
checked attribute means you can set a button as the pre-select one. user can change it any time. ONLY one radio button in a group should use this attribute.
<input type=”checkbox” name=”??” value=”xxx” checked=”checked />
Type “checkbox” can create button that user are able to pick one or more, and able to DESELECT it.
🔘xx 🔘xx 🔘xx
<select>
<option>???</option>
<option value=”xxx” selected=”selected>??</option>
</select>
by using <select> and <option>, we can make a drop down list box(search for example).</option></select>
<select>is the group that contains multiple <option>. each of option we can set its value and the text.</option></select>
selected attribute means you can set a button as the pre-select one. user can change it any time.