3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

html 自分用 メモ

Posted at

文字化けしないように

" data-sourcepos="2:1-3:3">

ファビコンのアイコン

<link rel="shortcut icon" href="favicon.ico>

コメントアウト

<!-- --><>

articleタグ

'そのセクションをそのままどこかに配信しても違和感のない情報の固まり'

#aside
'副次的なコンテンツ、補足情報とか広告'

#section
'こういった固まりではうまく整理できない、なんらかの意味のある固まり'

マークアップのやり方

まずやるべきは書きたいことをダダッと書いてあげて、アウトラインを意識しながら、タグを使って構造化

p、hr、pre、blockquote、div

'p: 段落
hr: 水平線
pre: 改行や字下げを保持
blockquote: 引用
div: スタイリング'

リスト系のタグ~ ol、ul、li、dl、dt、dd ~

'ol (ordered list) / ul (unordered list) / li (list item)
dl (定義リスト: definition list) / dt (定義見出し: definition term) / dd (定義の中身 :definition description)
'

strong、br、span

'strong: 重要(太字)
br: 改行
span: styleを当てる'

aタグでリンク表示先を別タブにする

ページ内リンクのやり方

<a href ="#apple"></a>

<div id="apple"></div>

表を2行使う

<td colspan="2">

formタグ

""form
action: どこに送るか?
method: get / post""

inputタグ

size: 横幅
maxlength: 最大文字数
value: 入力欄に何を入れるか
placeholder: うっすら文字を透けさせる
password: 文字を黒塗り

textarea,buttonタグ

textarea: テキストエリア
button: ボタン
disabled: 使えなくする(javascript)
input type="submit" =サブミットボタン

checkbox,radio,ladioタグ

checkboxタグ: 複数の選択肢から複数選んで良い
属性 'checked': 最初にチェックしてあるもの
radioタグ: 複数の選択肢があるのですが 1 つだけ選ばせたい
labelタグ: 囲んだ範囲を選択可能に

type属性

type="email"=@~がないとエラー
type="number"=数値じゃないとエラー
type="date"=日程じゃないとエラー
required=入力必須
novalidate=なくても平気

文字参照

数値文字参照
文字実体参照がある。

<>などの文字は空欄として表示されるので、<みたいに記入(ググる)
<を表示したい場合は、&を頭につける

コンテンツモデル

カテゴリー:どの分類か?
コンテンツモデル:どのカテゴリーのタグを入れられるか?(入れ子ができないタグがある)
トランスペアレント:親要素のコンテンツモデルを使ってね?

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?