-
Notifications
You must be signed in to change notification settings - Fork 0
Notes page
Lena edited this page Sep 12, 2023
·
2 revisions
Welcome to the Notes_for_html wiki!
- Notes_for_html
- Learn from freeCodeCamp: learn HTML by building a cat photo app
- 1.TEXT
- <h1> to <h6>, </h1> to </h6>| elements: used to signify the importance of content. Priority: <h1> > <h6>
- <p></p> | elements: create a paragraph of text.
- <!-- xxxxx --> | elements: add comments without affecting the browser display.
- 2. ACT
- nest | terms: put A into B--> A was nested. A, B are all elements 2 spaces in the front of A, just like: <B> ss<A></A> </B>
- <section></section> | elements: set content apart from future content.
- <main></main> | elements: help the HTML easier to read and more accessible to search by engines.
- <form></form>
- action="(link)" | attributes: send <form></form> to the link.
- <input> | elements: make a blank that can write something in.
- type="text/email/number" | attributes: allow the <input> blank only access to certain type of answers.
- name="" | attributes: give the data collected by <form></form> a name.
- placeholder="" | attributes: give a hint on what to write.
- required | attributes
- <button>xxx</button> | elements: create a button.
- type="xxx" | attributes: make the text xxx associated with the button.
- type="checkbox" | attributes: create a blank box, which can be selected.
- type="radio" | attribute: create a white point which can be chosen.
- <label></label> | elements: associate the <input> and the text behind. <label><input type="radio">xxx</label>: ⚪xxx
- id="" | attributes: make the xxx special and xxx must be unique for the entire page. <input type="radio" id="xxx">xxx: ⚪xxx
- name="A-B" | attributes: select one white point A while disselect the other, B.
- value="" | attributes: give the form file a name based on attribute name and value.
- <fieldset></fieldset> | elements: create a blank and circulate what nested, label/input together.
- <legend></legend> | elements: add some comments on the top of the blank. <fieldset><legend><label><input></label></legend></filedset>
- 3. IMAGE
- <img> | elements: add images.
- ⭐src="(image's URL)" | attributes: add images.
- alt="(text)" | attributes: display if the image fails to load.
- <figure></figure> | elements: images can be nested and then associated with a caption.
- <figcaption></figcaption> |elements: texts can be nested and then associated with the image.
- 4. LINK
- <a></a> | elements: between can add comments or images which will be hyperlinks.
- href="(link)" | attributes: lead to the link.
- target="_blank" | attributes: open the link in a new tab.
- 5. DECORATION
- <ul></ul> | elements: nest <ul></ul>, list items unorderedly by black points.
- <li></li> | elements: nest <ul></ul>, list items orderedly by numbers.
- <li></li> | elements: each item should nest in one pair of the tags.
- 6. FONT
- <em></em> | elements: italic.
- <strong></strong> | elements: bold.
- 7. NOTICE
- <input> has its file's name from <name> and <value>, so it's better to add the two attributes within it, usually the same as <id>.
LenaASu freeCodeCamp