HTMLについて

HTML (HyperText Markup Language)は、Webページを作成するためのマークアップ言語です。HTMLを使うことで、テキストや画像、音声、動画などのコンテンツをWebページ上に配置し、それらをリンクさせることができます。

HTMLは、タグ (tag) と呼ばれる特定の単語や文字列で構成される要素から成り立っています。タグは、以下のような形式で表現されます。

php
Copy code
<タグ名 属性="属性値">コンテンツ
例えば、以下のような

タグは、見出しを定義するためのものです。

css
Copy code

見出しのテキスト

また、以下のようにタグを使うことで、画像を表示することができます。

php
Copy code
画像の説明
さらに、HTMLは、CSSやJavaScriptなどの技術と組み合わせて、より複雑なWebページやアプリケーションを作成することができます。

HTMLは、Web開発において必要な基本的な技術であり、WebデザイナーやWeb開発者にとって重要なスキルとなっています。

HTMLの基礎

HTMLの基礎については以下の通りです。

HTMLの文書構造
HTML文書は基本的に以下のような構造を持ちます。
php
Copy code



ページのタイトル

見出し

文章の本文



はHTML5の文書タイプを指定するための宣言です。
はHTML文書全体を囲むタグで、その中にはとが含まれます。
は文書の情報を含むタグで、タイトルやスタイルシートなどが指定されます。
はHTML文書の本文を含むタグです。
HTMLタグ
HTML文書は、さまざまなHTMLタグを使って構成されています。タグは<と>で囲まれた文字列で、HTMLの要素を指定します。
例えば、

タグは見出しを表すために使用され、

タグは段落を表すために使用されます。

属性
HTMLタグには、属性を追加することができます。属性は、HTML要素の詳細を指定するために使用されます。
例えば、タグには、src属性を追加することで、表示する画像のファイルパスを指定することができます。

リンク
HTML文書では、リンクを作成することができます。リンクは、タグを使用して作成されます。
例えば、以下のように書くことで、Googleのウェブサイトにリンクを作成することができます。

php
Copy code
Google
画像の表示
HTML文書では、画像を表示することができます。画像の表示には、タグを使用します。
例えば、以下のように書くことで、”example.jpg”という画像を表示することができます。

php
Copy code
画像の説明
以上が、HTMLの基礎的な概念についての説明です。

HTML

HTML (Hypertext Markup Language) is a markup language used to create and structure content for the World Wide Web. It is the standard language for creating web pages and web applications.

HTML uses a system of tags and attributes to define the structure and content of a web page. Tags are used to enclose content, and attributes provide additional information about the content.

Some common HTML tags include:

: This tag is used to enclose the entire HTML document.
: This tag contains information about the document, such as the title and metadata.
: This tag contains the main content of the web page.

to

: These tags are used to define headings of various sizes.

: This tag is used to define paragraphs.
: This tag is used to create hyperlinks to other web pages or resources.
: This tag is used to embed images into the web page.
In addition to these tags, there are many other tags and attributes that can be used in HTML to create a wide variety of web content.

HTML is often used in conjunction with other web technologies, such as CSS (Cascading Style Sheets) for styling and layout, and JavaScript for interactivity and dynamic content.

Pythonの基礎

Pythonは、オブジェクト指向の高水準プログラミング言語で、読みやすく書きやすいという特徴があります。Pythonを学ぶためには、以下の基本的な概念や構文を学ぶ必要があります。

変数とデータ型
変数は、値を格納するための箱のようなもので、変数名に値を代入して使います。Pythonでは、整数(int)、浮動小数点数(float)、文字列(str)などのデータ型があります。
python
Copy code
x = 3
y = 4.5
z = “Hello World”
条件分岐
プログラム内で、ある条件によって処理を分けることができます。Pythonでは、if文を使って条件分岐を表現します。
python
Copy code
if x > 5:
print(“x is greater than 5”)
else:
print(“x is less than or equal to 5”)
ループ
繰り返し処理を行うために、for文やwhile文を使います。for文は、あらかじめ決まった回数の繰り返しに使われます。while文は、条件が真の間繰り返します。
python
Copy code
for i in range(1, 10):
print(i)

while x < 10: print(x) x += 1 関数 複数の処理をまとめて、何度も使い回すことができるようにするために、関数を定義することができます。 python Copy code def add(x, y): return x + y result = add(3, 4) print(result) # 7 モジュール Pythonは、様々なモジュールを提供しています。モジュールを使うことで、汎用的な処理を簡単に実装できます。 python Copy code import math x = math.sqrt(4) print(x) # 2.0 以上が、Pythonの基礎的な概念や構文です。Pythonは非常に多機能な言語であり、多くのライブラリやフレームワークがあります。より高度なプログラミングを学ぶ場合には、これらのライブラリやフレームワークを学ぶことが必要になってきます。

UNIX find

dotinstall:~ $ mkdir -p test/app{1..5}
dotinstall:~ $ touch test/app{1..5}/app{1..3}{.jpg,.png,.gif}
dotinstall:~ $ ls test/
app1 app2 app3 app4 app5
dotinstall:~ $ ls test/app1
app1.gif app1.png app2.jpg app3.gif app3.png
app1.jpg app2.gif app2.png app3.jpg
dotinstall:~ $ find test -name ‘app3.png’
test/app1/app3.png
test/app2/app3.png
test/app3/app3.png
test/app4/app3.png
test/app5/app3.png
dotinstall:~ $ find test -name ‘app1*’
test/app1
test/app1/app1.jpg
test/app1/app1.png
test/app1/app1.gif
test/app2/app1.jpg
test/app2/app1.png
test/app2/app1.gif
test/app3/app1.jpg
test/app3/app1.png
test/app3/app1.gif
test/app4/app1.jpg
test/app4/app1.png
test/app4/app1.gif
test/app5/app1.jpg
test/app5/app1.png
test/app5/app1.gif
dotinstall:~ $ find test -name ‘app1*’ -type f
test/app1/app1.jpg
test/app1/app1.png
test/app1/app1.gif
test/app2/app1.jpg
test/app2/app1.png
test/app2/app1.gif
test/app3/app1.jpg
test/app3/app1.png
test/app3/app1.gif
test/app4/app1.jpg
test/app4/app1.png
test/app4/app1.gif
test/app5/app1.jpg
test/app5/app1.png
test/app5/app1.gif
dotinstall:~ $ find test -name ‘app1*’ -type d
test/app1
dotinstall:~ $ rm -r test/
dotinstall:~ $

UNIX ブレース展開

dotinstall:~ $ echo {a,b,c}
a b c
dotinstall:~ $ echo {1..10}{a..g}
1a 1b 1c 1d 1e 1f 1g 2a 2b 2c 2d 2e 2f 2g 3a 3b 3c 3d 3e 3f 3g 4a 4b 4c 4d 4e 4f 4g 5a 5b 5c 5d 5e 5f 5g 6a 6b 6c 6d 6e 6f 6g 7a 7b 7c 7d 7e 7f 7g 8a 8b 8c 8d 8e 8f 8g 9a 9b 9c 9d 9e 9f 9g 10a 10b 10c 10d 10e 10f 10g
dotinstall:~ $ mkdir test && cd test
dotinstall:~/test $ mkdir app{1..5}
dotinstall:~/test $ ls
app1 app2 app3 app4 app5
dotinstall:~/test $ touch app{1..5}/test{1..3}{.jpg,.png,.gif}
dotinstall:~/test $ ls app2
test1.gif test1.png test2.jpg test3.gif test3.png
test1.jpg test2.gif test2.png test3.jpg
]dotinstall:~/test $ ]rm app{1..5}/test{1..3}{.jpg,.gif}
bash: ]rm: command not found
dotinstall:~/test $ rm app{1..5}/test{1..3}{.jpg,.gif}
dotinstall:~/test $ ls app2
test1.png test2.png test3.png
dotinstall:~/test $ cd
dotinstall:~ $ rm -r test/
dotinstall:~ $

UNIX パイプ

dotinstall:~ $ ls -l /etc/
total 208
-rw-r–r– 1 root root 7 May 29 2020 alpine-release
drwxr-xr-x 1 root root 4096 Sep 23 2020 apk
drwxr-xr-x 3 root root 4096 Sep 23 2020 ca-certificates
-rw-r–r– 1 root root 5613 Jun 18 2020 ca-certificates.conf
drwxr-xr-x 2 root root 4096 May 29 2020 conf.d
drwxr-xr-x 2 root root 4096 May 29 2020 crontabs
-rw-r–r– 1 root root 89 May 29 2020 fstab
-rw-r–r– 1 root root 693 Sep 23 2020 group
-rw-r–r– 1 root root 682 May 29 2020 group-
-rw-r–r– 1 root root 13 Dec 27 18:11 hostname
-rw-r–r– 1 root root 178 Dec 27 18:11 hosts
drwxr-xr-x 2 root root 4096 May 29 2020 init.d
-rw-r–r– 1 root root 570 May 29 2020 inittab
-rw-r–r– 1 root root 1748 Feb 9 2020 inputrc
-rw-r–r– 1 root root 54 May 29 2020 issue
-rw-r–r– 1 root root 309 Aug 9 2020 localtime
drwxr-xr-x 2 root root 4096 May 29 2020 logrotate.d
drwxr-xr-x 2 root root 4096 May 29 2020 modprobe.d
-rw-r–r– 1 root root 15 May 29 2020 modules
drwxr-xr-x 2 root root 4096 May 29 2020 modules-load.d
-rw-r–r– 1 root root 283 May 29 2020 motd
lrwxrwxrwx 1 root root 12 Dec 27 18:11 mtab -> /proc/mounts
drwxr-xr-x 8 root root 4096 May 29 2020 network
drwxr-xr-x 2 root root 4096 May 29 2020 opt
-rw-r–r– 1 root root 164 May 29 2020 os-release
-rw-r–r– 1 root root 1233 Sep 23 2020 passwd
-rw-r–r– 1 root root 1172 May 29 2020 passwd-
drwxr-xr-x 7 root root 4096 May 29 2020 periodic
-rw-r–r– 1 root root 238 May 29 2020 profile
drwxr-xr-x 1 root root 4096 Sep 23 2020 profile.d
-rw-r–r– 1 root root 1865 May 29 2020 protocols
-rw-r–r– 1 root root 54 Dec 27 18:11 resolv.conf
-rw-r–r– 1 root root 65 May 22 2020 securetty
-rw-r–r– 1 root root 14464 May 29 2020 services
-rw-r—– 1 root shadow 454 Sep 23 2020 shadow
-rw-r—– 1 root shadow 422 May 29 2020 shadow-
-rw-r–r– 1 root root 48 Sep 23 2020 shells
drwxr-xr-x 1 root root 4096 May 29 2020 ssl
-rw-r–r– 1 root root 3941 May 25 2020 sudo.conf
-rw-r–r– 1 root root 6169 May 25 2020 sudo_logsrvd.conf
-rw-r–r– 1 root root 3228 Sep 23 2020 sudoers
drwxr-x— 2 root root 4096 Sep 23 2020 sudoers.d
-r–r—– 1 root root 3174 May 25 2020 sudoers.dist
-rw-r–r– 1 root root 53 May 29 2020 sysctl.conf
drwxr-xr-x 2 root root 4096 May 29 2020 sysctl.d
drwxr-xr-x 13 root root 4096 Sep 23 2020 terminfo
-rw-r–r– 1 root root 5306 May 22 2020 udhcpd.conf
dotinstall:~ $ ls -l /etc/ | grep ‘sudo’
-rw-r–r– 1 root root 3941 May 25 2020 sudo.conf
-rw-r–r– 1 root root 6169 May 25 2020 sudo_logsrvd.conf
-rw-r–r– 1 root root 3228 Sep 23 2020 sudoers
drwxr-x— 2 root root 4096 Sep 23 2020 sudoers.d
-r–r—– 1 root root 3174 May 25 2020 sudoers.dist
dotinstall:~ $ ls -l /etc/ | grep ‘sudo’ | wc -l
5
dotinstall:~ $ ls -l /etc/ | grep ‘sudo’ | wc -l > results.txt
dotinstall:~ $ cat results.txt
5
dotinstall:~ $ rm results.txt
dotinstall:~ $

UNIX リダイレクション

date
dotinstall:~ $ echo ‘cal’ > commands.txt
dotinstall:~ $ cat commands.txt
cal
dotinstall:~ $ echo ‘date’ >> commands.txt
dotinstall:~ $ cat commands.txt
cal
date
dotinstall:~ $ /bin/ash < commands.txt December 2022 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Tue Dec 27 20:04:43 JST 2022 dotinstall:~ $ /bin/ash < commands.txt > results.txt
dotinstall:~ $ cat results.txt
December 2022
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Tue Dec 27 20:05:01 JST 2022
dotinstall:~ $ rm ‘
>