Lesson 2

Lesson 2: Element ແລະ Attribute

<p>ນີ້ແມ່ນວັກໜັງສື.</p>

<p>ອີກວັກໜຶ່ງ.</p>

ແທັກ <a> ແມ່ນກໍານົດການລິງໃນພາສາ HTML :

ຕົວຢ່າງ:

<a href="https://www.google.com">ລິງຫາ Google</a>

ການກໍານົດປາຍທາງໃຊ້ ແອັດທຣິບບິວທີ່ຊື່: href

ແທັກ <img> ກໍານົດການສະແດງຮູບພາບ ເຊິ່ງປະກອບມີ ແອັດທຣິບບິວຄື: src, alt, width, and height

<img src="Me.jpg" alt="For my web" width="104" height="142">

ແທັກ style ຖືກນໍາໃຊ້ເພື່ອກໍານົດຮູບແບບຂອງ Elements ເຊັ່ນ: color, font, size, and ອື່ນໆ.

<ຊື່ແທັກ style="property:value;">

<body style="background-color:powderblue;">

<h1>ຫົວຂໍ້</h1>

<p>ວັກໜັງສື.</p>

</body>

<body>

<h1 style="background-color:powderblue;">ນີ້ແມ່ນຫົວຂໍ້</h1>

<p style="background-color:tomato;">ນີ້ແມ່ນວັກໜັງສື.</p>

</body>

<h1 style="color:blue;">ຫົວຂໍ້</h1>

<p style="color:red;">ວັກໜັງສື.</p>

<h1 style="font-family:verdana;">ຫົວຂໍ້</h1>

<p style="font-family:courier;">ວັກໜັງສື.</p>

<h1 style="font-size:300%;">ຫົວຂໍ້</h1>

<p style="font-size:160%;">ວັກໜັງສື.</p>


HTML Formatting Elements

Formatting elements ເພື່ອສະແດງຮູບແບບພິເສດຂອງຂໍ້ຄວາມ

<b> - Bold text

<strong> - Important text

<i> - Italic text

<em> - Emphasized text

<mark> - Marked text

<small> - Smaller text

<del> - Deleted text

<ins> - Inserted text

<sub> - Subscript text

<sup> - Superscript text

<b>This text is bold</b>

<strong>This text is important!</strong>

<i>This text is italic</i>

<em>This text is emphasized</em>

<small>This is some smaller text.</small>

<p>Do not forget to buy <mark>milk</mark> today.</p>

<p>My favorite color is <del>blue</del> red.</p>

p>My favorite color is <del>blue</del> <ins>red</ins>.</p>

<p>This is <sub>subscripted</sub> text.</p>

ຄໍາຖາມ