semantic-markup

Custom post types support in WordLift

怎甘沉沦 提交于 2019-12-23 19:45:58
问题 I am using the WordLift plugin for WordPress and I'd like to add support for Semantic SEO for other custom post types in my web site. Is there a way to do this? 回答1: Yes, there's a filter you can use to add the custom post types: wl_valid_entity_post_types . The filter takes an array with the supported post types (by default post , page and entity ). You can add custom post types to the array and return it, e.g.: add_filter('wl_valid_entity_post_types', function ($post_types) { $post_types[]

schema.org product availability tags markup

故事扮演 提交于 2019-12-23 09:32:41
问题 Which one is correct? <link itemprop="availability" href="http://schema.org/InStock"> ​<meta itemprop="availability" content="InStock" /> <span itemprop="availability" content="in_stock"></span> I checked official schema documentation and in examples found all of them. I suppose all of them will work, but at the moment, is there any preferred standard? 回答1: Using span with the content attribute is invalid . Neither HTML5 nor Microdata allow the content attribute for span. Using meta is

Is it appropriate to wrap each navigation element in a div?

烂漫一生 提交于 2019-12-23 09:20:24
问题 I'm learning HTML + CSS and working on a website where I need to have a vertical navigation bar on the left side which will have four elements which can be interacted with. Is it standard practice to wrap each of these four elements with a div or is there a more elegant or semantic way to solve this problem? I will want each element to have unique on-click functions associated with them, which is why I thought giving them divs and classes would make the most sense for interacting with them

What's the difference between using RDFS/OWL and XML?

笑着哭i 提交于 2019-12-23 03:02:08
问题 Mainly, I was wondering what advantages the ontology languages of RDFS/OWL has over using a markup system (such as http://www.schema.org/) for managing and creating metadata? I'm still very confused about how different concepts of the "Semantic Web" are supposed to fit together in the overall picture... The relation between RDF/RDFS/RDFa? OWL? URIs? and finally, XML and SQL/SPARQL? All the descriptions I've read about so far about them make sense individually, but I'm not sure if I could be

How to mark the copyright of an image in html?

吃可爱长大的小学妹 提交于 2019-12-22 03:17:18
问题 this is a mostly semantic question. I want to put images with copyrights on the website. I know the figure and figcaption element, but figcaption doesn't seem the best tag for that. It's rather a caption which I also need. If I've got an image like that: <figure> <img src="img/content/preview.jpg" alt="Alttext für das Bild" /> <figcaption>Caption goes here</figcaption> </figure> Where do I put the copyright? EDIT: The copyright text must be visible. 回答1: In general The copyright notice should

HTML element for ad?

耗尽温柔 提交于 2019-12-21 07:56:39
问题 Is there any authoritative information on the web concerning which HTML element to chose for an advertisement banner? I considered <article> or <aside> , but I think more appropriate is simply: <div class="ad"> 回答1: In most cases I'd use the aside element: The element can be used for […] for advertising , […] and for other content that is considered separate from the main content of the page. As the aside element is a sectioning element, it creates an entry in the document outline, even if

What is the cite attribute for?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 11:56:10
问题 The cite attribute specifies the address of the source of the quoted text, I think, but who uses this information? For example: <q cite="http://www.example.com/quote"> <p>“A quote”</p> <footer>&#151;Person quoted</footer> </q> The source of the quoted text isn't visible to the end-user in a normal browser, so who does use this information, and how? 回答1: First, it's not only blockquote where you can use the cite attribute. You can use the cite attribute on the following elements also:

Should <sections> have <articles> or should <articles> have <sections>?

一世执手 提交于 2019-12-20 10:47:21
问题 I'm reading Mark Pilgirm's "Dive into HTML5" and in the semantics section, it talks about how HTML5 introduces the <article> and <section> elements. It says that <section> s represent a generic document or section, while <article> s represent a self-contained composition. I don't see a logically semantic parent-child relationship either way. I tried running the following code through the HTML5 Outliner and it seemed to indicate that the document outline comes out the same, no matter how they

Can I use <nav> tag for list of article tags?

只愿长相守 提交于 2019-12-20 04:52:03
问题 After the article I have list of tags related to article. Is it semantically correct to wrap list of those tags in <nav> html tag? If no, what would be the proper one? <nav class="tags"> Tags: <ul> <li><a href="#">Tag1</a></li> <li><a href="#">Tag2</a></li> <li><a href="#">Tag3</a></li> </ul> </nav> MDN states: Not all links of a document must be in a <nav> element, which is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't

Making an h2 tag with a strong tag inside accessible

拟墨画扇 提交于 2019-12-20 04:16:06
问题 So this may seem like a very simple question but I can't get my head around it. I have the following HTML: <h2>word 1 - <strong> word 2 </strong></h2> I know that this isn't semantically correct and I shouldn't have a strong inside a heading, but due to design requirements I need to bold the second word but not the first one. I'm trying to make sure that this text is still accessible, but when I use a screen reader it gives me weird readings. I'm guessing it is because of the <strong> tag