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

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.

主站蜘蛛池模板: 蓬溪县| 安溪县| 洮南市| 田阳县| 米易县| 昌平区| 平潭县| 易门县| 郁南县| 仙游县| 新建县| 沙洋县| 日土县| 定边县| 广饶县| 克拉玛依市| 文山县| 同江市| 内丘县| 德安县| 麟游县| 手游| 班戈县| 建平县| 上饶县| 冷水江市| 辽阳县| 安阳市| 青神县| 广元市| 蕉岭县| 湘潭县| 宾阳县| 南阳市| 会东县| 武宣县| 增城市| 蓬溪县| 历史| 聊城市| 廉江市|