官术网_书友最值得收藏!

Chapter 1. HTML Elements

HyperText Markup Language (HTML) is a language that annotates text. Annotation of text is done using elements. Using the following p element, as an example, we will see how to use HTML:

<p>This is an example</p>

HTML elements also have attributes that will modify how they are rendered or interpreted. Attributes are added inside of the starting tag. Here is the class attribute in a p element:

<p class="example">This is an example</p>

There have been multiple specifications of HTML so far, but we will just look at the most commonly used and important elements of HTML5. HTML5 is the latest official specification, so we will be as future-proof as possible at the time of writing this book. You will want to follow the specifications of HTML as closely as possible. Most browsers are very forgiving and will render your HTML, but when you go beyond the specifications, you can and will run into strange rendering issues.

Note

All HTML elements will have global attributes. The attributes listed for each element in the sections that follow are the attributes beyond the global attributes.

主站蜘蛛池模板: 武清区| 武强县| 崇明县| 赞皇县| 虞城县| 肃南| 宝清县| 浠水县| 瑞丽市| 定西市| 玛纳斯县| 淮滨县| 昭觉县| 华亭县| 堆龙德庆县| 嵊州市| 铜鼓县| 怀远县| 郯城县| 大余县| 金溪县| 长阳| 麻栗坡县| 丹江口市| 江都市| 普陀区| 乐亭县| 灌阳县| 乳源| 涡阳县| 浪卡子县| 当涂县| 三台县| 商丘市| 江口县| 唐海县| 深圳市| 灵寿县| 荆门市| 布拖县| 集贤县|